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

provider.pollingInterval not discussed in v5 docs or Getting Started #2625

Closed
krunkosaurus opened this issue Jan 31, 2022 · 1 comment
Closed
Labels
documentation Documentation related issue.

Comments

@krunkosaurus
Copy link

Hi there, great library! Thank you for it.

I notice that provider.pollingInterval is in the v4 docs but not v5: https://docs.ethers.io/v4/api-providers.html

Not only is this important to display to understand how polling works and at what timing but it also let's people know that the library actually does "poll by default" when any events are set—even with HTTP connections.

As a person coming from web3.js (where I had to create my own polling) or just JavaScript in general it's a super helpful feature to have but it isn't really discussed anywhere.

In my tests, setting contract.on("Transfer"... or provider.on("block"... was constantly triggering and I was scouring the docs to understand why and at what frequency. Google searches only lead to "Transaction Filter" page on v5 docs discussing other polling related events and finally to old Github resolved tickets where people were asking for the ability to adust the time.

Thanks for your consideration!

@krunkosaurus krunkosaurus added the documentation Documentation related issue. label Jan 31, 2022
ricmoo added a commit that referenced this issue Feb 3, 2022
@ricmoo
Copy link
Member

ricmoo commented Feb 3, 2022

Added here. There is room to add more info about the BaseProvider, but a lot of this changes in v6 (as Provider is an interface, not an abstract class), so I will focus more on that then, unless someone needs it sooner.

Thanks! :)

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

No branches or pull requests

2 participants