-
Notifications
You must be signed in to change notification settings - Fork 43
refactor(sdk): Support multiple contracts in ChainEventPoller
#2928
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
refactor(sdk): Support multiple contracts in ChainEventPoller
#2928
Conversation
|
To address your point
We had a discussion on video meeting (me and Teo ofc), maybe better to leave out and have it as caller's responsibility (especially since it was like this before). On that front, regarding the |
Refactored
ChainEventPollerto support multiple contracts simultaneously. Now the class is a singleton and we can define contract methods as a listener parameter. This optimizes log fetching by reducing required HTTP calls to the JSON RPC as there needs to be only one poller running even if multiple contract events are listened.Also we don't now need to create a
Contractinstance just for adding event a listener. This allows us to simplify e.g.Operatorclass (in a follow-up PR).