-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
forge script nonce issue related to selectFork #6184
Comments
edit: updated the example to be even more minimal (initially though was related to multichain, but just calling In practice what we do is:
Also, for anyone facing this, one workaround which seems to work for us is to simply not switch back to the fork but always create a new one: - uint256 previousFork = vm.activeFork();
- vm.selectFork(previousFork);
+ vm.createSelectFork(vm.rpcUrl('mainnet')); |
I've proposed a fix here. #6271 |
@sakulstra @Evalir can close this as completed since #6271 is merged? |
@RedaOps i think it's working fine now thx. |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (deae4f1 2023-10-11T00:27:48.322843000Z)
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
Hello, at aave governance v3 we have a script that:
While when testing everything works/worked fine, when actually submitting via ledger we're getting nonce issues like:
The issue seems to happen whenever we do selectFork within a script.
Here i created a minimal reproduction:
The script is started with a mainnet rpc, calls selectFork witht he activeForkId which is 0 and i think should essentially just be a noop in that case?.
The trace looks as follows:
Instead of being able to submit the txn though, i'm getting:
Seems related:
The text was updated successfully, but these errors were encountered: