-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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.on fires past events #3069
Comments
I'm unfamiliar with wagmi, but you shouldn't need to use You also cannot pass a But neither of those should affect your code... Can you try your code outside of wagmi to see if has anything to do with that? |
I'm getting previous events fired with |
It doesn't seem that |
Thanks! I have found the bug. Yes, this was introduced with the fix for networks which have non-consistent event indexing (e.g. Polygon and BSC). This fix will go out in v5.7.0. |
This has been published in v5.7.0. Let me know if you still experience any problems. Thanks! :) |
Ethers Version
5.6.5
Search Terms
subscribe new events filter
Describe the Problem
Hi,
when I am subscribing to a contract's events I am also seeing past events even the filter
fromBlock: 'latest'
is set.Am I doing something incorrectly?
I should mention, I am using wagmi however, I don't think that changes the way ethers works as I just work with the ethers.Contract.
Help appreciated, cheers 🙏🏼
Code Snippet
No response
Contract ABI
No response
Errors
No response
Environment
Ethereum (mainnet/ropsten/rinkeby/goerli), node.js (v12 or newer), Hardhat, Ganache
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: