-
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
Slow mode and skip simulation for script don't work #5776
Comments
I just found another reported issue with |
I can also report that |
same, |
@DaniPopes my hunch is that this is related to the recent directory reorg? |
Looking at this |
hi all! tried to quickly repro but can't neither repro |
@Evalir my repro is a small as it gets, one single file that you can run against a sepolia fork (I use an alias in my foundry.toml, see below). forge script --slow --rpc-url sepolia script/Bug.sol:MyScript The script above should NOT revert. The error is clearly shown in the logs: the first and second call to # foundry.toml
[rpc_endpoints]
sepolia = "https://sepolia.gateway.tenderly.co" Which version did you use? I just reproduced now with |
Hi, do you have any workaround to enable skip local simulation? simulation is good but not friendly to evm chains with precompiles |
@Evalir Hi sir, have you investigated into this problem? I'd like to help if anybody could share some insights on this |
So, coming back to this @beeb / @adu-web3: Slow mode and skip simulation both work as intended. What is happening here, and what happens with chains with custom precompiles, is a script limitation:
As a result, I'm going to close this specific issue as it's misleading (it does work), but it's a limitation which we should remove in a future script refactor and I'll document this in a new issue. |
Hey @Evalir , thanks for the in-depth explanation. So if I understand correctly, it's not currently possible to run with broadcast a script where each transaction must happen in a separate block due to a revert condition? The internal simulation of the script, which cannot be disabled, would fail and so the transaction discovery could not be done. Let's hope a future refactor of the evm simulation makes this possible, as this would enable some deployments with safety locks preventing two transactions from being in the same block. Cheers |
In that case:
I have the same problem as #8163 and I saw that as of April (with PR: #7589) it's possible to inject precompiles to Anvil. Is there a way to do this for a forge script? |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (2f4a77e 2023-08-31T00:32:46.319290372Z)
What command(s) is the bug in?
forge script
Operating System
Linux
Describe the bug
I'm trying to run multiple transactions in subsequent blocks as part of a single script run.
I came accross the
--slow
argument which is supposed to do that, and I found a PR that described that it would skip blocks between transactions in simulation mode.However, when I try to run the script below with
--slow
, the second call reverts (meaning it's in the same block as the first one).What's more, when trying to actually run the script with broadcast on testnet, I can't get past the simulation with the
--skip-simulation
argument and no transaction is broadcast at all (not even the contract deployment).The text was updated successfully, but these errors were encountered: