Skip to main content
Defined in the Ethereum JSON-RPC Specification
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Parameters

object
required
The transaction call object.

Returns

string
The amount of gas used as a hexadecimal string.

Error Handling

The estimate may not be accurate if the blockchain state changes between the estimation and actual execution.