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

Subscribe to events without contract #295

Open
kroggen opened this issue Oct 17, 2023 · 2 comments
Open

Subscribe to events without contract #295

kroggen opened this issue Oct 17, 2023 · 2 comments
Labels

Comments

@kroggen
Copy link
Member

kroggen commented Oct 17, 2023

Currently it is only possible to subscribe to events informing a single contract address for filter

But in some cases we are interested in many contracts, or not any specifically, but in some type of event

For these cases we could allow the subscription to events using only the event name as the filter

This allows the subscription to a type of event, regardless of which contract will emit it

This can be applied to ListEvents and ListEventStream

@kroggen
Copy link
Member Author

kroggen commented Oct 17, 2023

This differs from #150 which would return all events from the blocks and thus probably use too much resources

@kroggen
Copy link
Member Author

kroggen commented Oct 24, 2023

It will be common to have apps needing to listen to many different contracts, or to many different events. So the engine could allow both:

  • Retrieve events from a list of contracts, up to some limit
  • Retrieve events from a list of event names, up to some limit

It is better to allow these external apps to subscribe to many different sources on the same connection than to have them create many different separate connections. The later would use more resources.

The limits can be:

  • 32 event names
  • 64 or 128 contracts

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

No branches or pull requests

1 participant