You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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.
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.htmlNot 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"...
orprovider.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!
The text was updated successfully, but these errors were encountered: