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

Docs: clarify `fromBlock`'s behaviour in event subscriptions #2668

Open
sohkai opened this Issue Apr 11, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@sohkai
Copy link

sohkai commented Apr 11, 2019

Description

The current documentation on contract event subscriptions are a bit vague as to the actual behaviour of event subscriptions.

Looking under the hood, an undefined, 0, or 'latest' value for fromBlock skips the eth_getlogs call and immediately places a subscription.

It would be great if this was documented publicly and advertised as part of the API. We specifically have use cases where we want to avoid merge eth_getlogs and eth_subscribe's results together in a transparent manner, to allow us to know when we've finished syncing past log state. We also sometimes want to only subscribe to new events.

Expected behavior

More information would be available in the documentation.

Actual behavior

Documentation is vague.

@sohkai sohkai referenced this issue Apr 11, 2019

Merged

Wrapper: Handle SetApp for updated apps #267

3 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.