Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listening to events in v6 #541

Open
0xmarvin42 opened this issue Jul 18, 2024 · 2 comments
Open

Listening to events in v6 #541

0xmarvin42 opened this issue Jul 18, 2024 · 2 comments

Comments

@0xmarvin42
Copy link

Event#watch() is removed.
contract.someEvent().watch() is no longer supported.

How should I listen to events? I can call getEventsByBlockNumber once in a while, but I'd like to be able to respond to events right away

@start940315
Copy link
Contributor

Just call getEventsByBlockNumber every second (or 3 seconds, make the time you want). This is what watch method used to do.

@FlamesX-128
Copy link

FlamesX-128 commented Aug 19, 2024

What was the reason for the removal of the .watch() method? I believe it would be more convenient to have a default method to watch contracts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants