Skip to main content

eth_estimateGas RPC Method

Returns an estimation of gas for a given transaction.

Updated on
Oct 26, 2026
Base Sepolia Denim activated — October 21, 2026

Denim activated on Base Sepolia on October 21, 2026, replacing Flashblocks with canonical 200ms blocks. Flashblocks subscriptions and the "pending" block tag no longer provide preconfirmation data on Sepolia. Use canonical blocks and state instead. Base Mainnet continues to use Flashblocks until its own Denim activation, which is targeting November 2026.

See the Denim migration steps.

Parameters

transaction
object
REQUIRED

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

quantity

The estimated amount of gas used

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": "0x5208"
5
}
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": "0x5208"
5
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free