Skip to main content

eth_estimateGas RPC Method

Returns an estimation of gas for a given transaction.

Updated on
May 28, 2026
Please note that for this RPC method, if the block number is set to pending, Polygon zkEVM assumes it as the latest.

Parameters

transaction
object

The transaction call object:

from
string

The address from which the transaction is sent

to
string
REQUIRED

The address to which the transaction is addressed

gas
integer

The integer of gas provided for the transaction execution

gasPrice
integer

The integer of gasPrice used for each paid gas encoded as hexadecimal

value
integer

The integer of value sent with this transaction encoded as hexadecimal

data
string

The hash of the method signature and encoded parameters. For more information, see the Contract ABI description in the Solidity documentation.

blockNumber
string

The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized

Returns

result
string

The estimated amount of gas used

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free