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

Multichain deployment gives EOA nonce changed unexpectedly while sending transactions #4701

Closed
2 tasks done
0xTimepunk opened this issue Apr 6, 2023 · 5 comments
Closed
2 tasks done
Labels
Cmd-forge-script Command: forge script T-bug Type: bug

Comments

@0xTimepunk
Copy link

0xTimepunk commented Apr 6, 2023

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (93016e6 2023-04-06T00:04:49.011111000Z)

What command(s) is the bug in?

forge script

Operating System

macOS (Apple Silicon)

Describe the bug

When doing a multi chain local deployment, with the script pointing to localhost instances of Anvil (6 running at the same time, each forking different mainnet RPCs using quick nodes as a provider), the forge script always gives the following error:

EOA nonce changed unexpectedly while sending transactions. Expected 3421 got 3370 from provider.), Err( EOA nonce changed unexpectedly while sending transactions. Expected 289 got 238 from provider.)]

The nonces with errors are always different. It seems to be the issue with two of the providers, but I'm not sure how to find which one as the logs don't say.

The script is ran with

forge script script/Local.Deploy.s.sol \
    --broadcast \
    --private-key $LOCAL_PRIVATE_KEY

and is automatically detected as multi chain deployment.

@wrinkledeth
Copy link

I'm experiencing the same bug. Also on mac (AppleSilicon), also during multi chain local deployment. I don't always get this error, it happens intermittently.

@ArshanKhanifar
Copy link
Contributor

I'm experiencing the same bug here.

@ArshanKhanifar
Copy link
Contributor

I've proposed a fix here #6271

@0xTimepunk
Copy link
Author

I've proposed a fix here #6271

Lovely. Thanks for the help!

@zerosnacks
Copy link
Member

Marking as resolved by #6271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmd-forge-script Command: forge script T-bug Type: bug
Projects
Status: Completed
Development

No branches or pull requests

5 participants