You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you ensured that all of these are up to date?
Foundry
Foundryup
What version of Foundry are you on?
forge 0.2.0
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
I'm storing the output of a function call in memory, for use as an argument to another function call within my script.
However, the value from the local simulation is being persisted, and used as the argument to the equivalent function call within the context of the onchain simulation too, instead of being thrown to use the new output from the onchain simulation.
For example:
Contract contract = Contract(0xABC);
function run() public {
vm.startBroadcast();
bytes32 a = contract.doSomething();
contract.doSomethingElse(a);
vm.stopBroadcast();
}
The local simulation is running successfully.
When it comes to the onchain simulation, the value of a === the previous value of a within the local simulation.
a is not being updated with the new value in the context of the onchain simulation.
Traces:
a = 0x12345...
contract.doSomething(0x12345...)
Simulated On-chain Traces:
a = 0x456789...
contract.doSomething(0x12345...)`
REVERT (expected 0x456789...)
The text was updated successfully, but these errors were encountered:
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
I'm storing the output of a function call in memory, for use as an argument to another function call within my script.
However, the value from the local simulation is being persisted, and used as the argument to the equivalent function call within the context of the onchain simulation too, instead of being thrown to use the new output from the onchain simulation.
For example:
The local simulation is running successfully.
When it comes to the onchain simulation, the value of
a
=== the previous value ofa
within the local simulation.a
is not being updated with the new value in the context of the onchain simulation.Traces:
a = 0x12345...
contract.doSomething(0x12345...)
Simulated On-chain Traces:
a = 0x456789...
REVERT
(expected 0x456789...)The text was updated successfully, but these errors were encountered: