-
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 script
): --skip-simulation
does not skip simulation
#6825
Comments
thanks for flagging, possible regression, fixing asap |
do you have a minimal repro for this? |
Had some previous discussion in #5776 |
Yeah based on @Evalir's comment here: #5776 (comment) it does seem like this intentional and kind of unavoidable based on how scripts currently work. Unfortunately, this does mean that Not sure how you'd fix this exactly, maybe have a separate environment in which the script contract is run and the actual simulation itself, any external CALLs made in one are captured and emitted as transactions in the actual environment? |
Here's a minimal repro This seems like a niche case but there are others like self-destruct, reinit or other weird dependencies like gas-price that would cause the same issue |
copying good background provided by @Evalir from #5776 :
much of my experience with wanting this feature to avoid local sim was around similar edge cases. On-chain randomness where the randomness is seeded by things like gas, gas-limit, coinbase, etc that is difficult to match exactly in a forge script. |
Can we get an ETA on this? |
--skip-simulation
does not skip simulation
--skip-simulation
does not skip simulationforge script
): --skip-simulation
does not skip simulation
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (24abca6 2024-01-16T00:26:29.551032000Z)
What command(s) is the bug in?
forge script --skip-simulation
Operating System
macOS (Apple Silicon)
Describe the bug
Often there are things that my script depends on that foundry is unable to simulate correctly (self-destruct reinit, hot/cold storage gas cost).
Whether
--skip-simulation
is provided or notforge script
will simulate the script first before attempting to broadcast it. Meaning that if it's incorrectly failing in the simulation I'm unable to broadcast transactions using foundry.The
--skip-simulation
flag does however get the script runner to exclaim "SKIPPING ON CHAIN SIMULATION." after it has successfully ran the simulation 😅The text was updated successfully, but these errors were encountered: