You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to listen to a specific event for a smart contract that is already deployed on Rinkeby. Could you show a few lines of example code for doing that?
Cheers
The text was updated successfully, but these errors were encountered:
ripern
changed the title
Listen to events from an existing smart contract
Listen to events from a already deployed smart contract
Mar 13, 2018
Heyo, yes, so I would setup a contract object and then use either getLogs or onEvent.
getLogs will scan through the entire chain from where you specify the fromBlock blocknumber and toBlock blocknumber. The log data will then be decoded and will be returned.
I would use getLogs initially then use onEvent for keeping up to date. I'll get an example up tomorrow.
On Mar 13, 2018, at 10:10 PM, Magnus Bondesson ***@***.***> wrote:
I'd like to listen to a specific event for a smart contract that is already deployed on Rinkeby. Could you show a few lines of example code for doing that?
Cheers
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I'd like to listen to a specific event for a smart contract that is already deployed on Rinkeby. Could you show a few lines of example code for doing that?
Cheers
The text was updated successfully, but these errors were encountered: