-
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
bug(forge): vm.transact cheatcode not working #5929
Labels
T-bug
Type: bug
Comments
Am having a similar problem (same OS, same version of forge). It seems like the Example to replicate:
|
Same issue here with
What does the error mean? My temporary workaround: function replay(
bytes32 txHash,
address from,
address to,
uint256 value,
bytes memory data
) internal {
uint256 forkId = vm.createFork("rpc");
vm.selectFork(forkId);
vm.rollFork(txHash);
vm.startPrank(from, from);
to.call{ value: value }(data);
vm.stopPrank();
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (80df71f 2023-09-27T00:24:52.309432000Z)
What command(s) is the bug in?
No response
Operating System
macOS (Apple Silicon)
Describe the bug
I ran the vm.transact code example from the Foundry Book in a forge test, the test failed with reason "backend: failed committing transaction: Transaction(NonceTooLow { tx: 1, state: 2 })".
For MAINNET_RPC_URL, I was using "https://rpc.ankr.com/eth".
The text was updated successfully, but these errors were encountered: