Skip to main content
Returns an estimate of how much gas is required to execute a transaction. The estimate may be larger than the gas actually used at execution time.
Flashblocks: Query https://mainnet.base.org with "pending" to estimate gas against the current pre-confirmed state, useful when a transaction depends on a prior pre-confirmed one.

Parameters

object
required
The transaction object to estimate gas for.
string
Block to estimate against. Optional; defaults to "latest". Use "pending" to estimate against pre-confirmed state.

Returns

string
The estimated gas amount as a hexadecimal integer.

Error Codes

Example