Estimate gas needed for a transaction
Defined in the Ethereum JSON-RPC Specification
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
The transaction call object.
The amount of gas used as a hexadecimal string.
Code | Message | Description |
---|---|---|
-32602 | Invalid params | Invalid transaction parameters |
-32000 | Execution reverted | Transaction would revert during execution |
4100 | Requested method not supported | The method is not supported by the wallet |
The estimate may not be accurate if the blockchain state changes between the estimation and actual execution.
Estimate gas needed for a transaction
Defined in the Ethereum JSON-RPC Specification
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
The transaction call object.
The amount of gas used as a hexadecimal string.
Code | Message | Description |
---|---|---|
-32602 | Invalid params | Invalid transaction parameters |
-32000 | Execution reverted | Transaction would revert during execution |
4100 | Requested method not supported | The method is not supported by the wallet |
The estimate may not be accurate if the blockchain state changes between the estimation and actual execution.