-
Notifications
You must be signed in to change notification settings - Fork 135
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
Inaccurate gas estimation #418
Comments
@Karrq is this still relevant, if so what is the status? |
We did improve gas estimation considerably recently, but haven't been able to check the results of the estimation personally, so we need to run some tests before updating the issue /cc @elfedy |
As of today, the estimation (which involves txs running locally using the rpc fork parameters) is in fact innacurate because the fee parameters are not being correctly used in the local vm, however the gas limit of the tx is overriden with the estimation from an rpc call, which currently renders the simulation useless for us. We should at least show the right gas parameters and also do some tests comparing the estimation vs rpc_call, maybe it makes sense to use the estimation directly. |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.0.2 (8cb46fa 2024-06-05T13:34:46.413496000Z)
What command(s) is the bug in?
forge script
Operating System
None
Describe the bug
When using
forge script
to deploy contracts,forge
attempts to calculate the exact gas required to execute a given transaction on the target chain (with--broadcast
flag).Currently, this estimation is inaccurate due to differing gas parameters, which sometimes can lead to failures when broadcasting these transactions on chain.
The text was updated successfully, but these errors were encountered: