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
When running forge script against an anvil fork, I receive the following error:
Context:
- Error #0: Failed to estimate gas for tx
- Error #1: server returned an error response: error code -32602: Invalid input: `max_priority_fee_per_gas` greater than `max_fee_per_gas`
When printing debug information with RUST_LOG=debug, I find the following transaction object:
Note that most all of the fields, including gas related ones, are set to None. I have omitted some fields for length / privacy with ...
However, if I simply add --priority-gas-price with a value of 0 or some arbitrary value that is lower than whatever the max_fee_per_gas is set to, the script will succeed. I do not know of a way to see beforehand what this value is unless I use --with-gas-price to set it arbitrarily.
Notably, the transaction object in this case will be populated with specified values:
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (440ec52 2024-04-11T00:18:58.806922049Z)
What command(s) is the bug in?
forge script
Operating System
Linux
Describe the bug
When running
forge script
against an anvil fork, I receive the following error:When printing debug information with
RUST_LOG=debug
, I find the following transaction object:2024-04-11T09:59:25.940032Z DEBUG cheatcodes: broadcastable create tx=BroadcastableTransaction { rpc: Some("http://localhost:8545"), transaction: TransactionRequest { from: Some(...), to: None, gas_price: None, max_fee_per_gas: None, max_priority_fee_per_gas: None, max_fee_per_blob_gas: None, gas: None, value: Some(0x0_U256), input: TransactionInput { input: Some(..., data: None }, nonce: Some(25), chain_id: None, access_list: None, transaction_type: None, blob_versioned_hashes: None, sidecar: None } }
Note that most all of the fields, including gas related ones, are set to
None
. I have omitted some fields for length / privacy with...
However, if I simply add
--priority-gas-price
with a value of0
or some arbitrary value that is lower than whatever themax_fee_per_gas
is set to, the script will succeed. I do not know of a way to see beforehand what this value is unless I use--with-gas-price
to set it arbitrarily.Notably, the transaction object in this case will be populated with specified values:
Thus far, I have only tested this on Blast and Blast Sepolia.
The text was updated successfully, but these errors were encountered: