Skip to content

What's the equivalent of web3.eth.subscribe('logs' #3301

Answered by ricmoo
BravoNatalie asked this question in Q&A
Discussion options

You must be logged in to vote

The closest would be provider.on({ address, topics }, (log) => { … });. I’m not sure what error would mean in that context though.

If you have the contract ABI, you can more simply use the contract.on API which will do the parsing and some other heavy lifting for you. :)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BravoNatalie
Comment options

Answer selected by BravoNatalie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants