-
Notifications
You must be signed in to change notification settings - Fork 5k
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
How does MetaMask calculate the correct transaction nonce? #5476
Comments
Put simply: we take the "highest" known confirmed nonce and add the pending transaction count from your local tx history (the transactions you've sent from within metamask). Given that sometimes infura may not know the most update nonce (asking a node a block behind etc.) We do to calculations for confirmed nonces: Derived from local confirmed and eth_getTransactionCount and choose the highest of the two. you can reference all this code here: nonce-tracker |
Excellent, thank you so much for the link @frankiebee ! |
Is it possible to suggest a nonce to the metamask extension to be able to cancel a pending transaction or update the gas price? |
@kaibakker we support speeding up tx already, check out #4022 re: cancelling |
How does MetaMask calculate the correct transaction nonce when multiple transactions are being issued?
It's well known that eth_getTransactionCount does not return the correct number of pending transactions, so I was wondering how you guys do it. Could be really beneficial for the community to learn from.
The text was updated successfully, but these errors were encountered: