eth_estimateGas

Estimates the gas needed to execute a transaction without creating it on the blockchain. Returns the amount of gas used which can be used as a gas estimate. ⚡ Compute Units: [75 CU](https://docs.conduit.xyz/rpc-nodes/information/compute-units)

Request

This endpoint expects an object.
transactionobjectRequired
Transaction call object
blockIdentifierenum or stringOptional

Block number, tag, or hash (EIP-1898 object form also accepted). Defaults to "latest".

stateOverridesobjectOptional

Optional per-address state overrides applied before estimation.

blockOverridesobjectOptional

Optional block-header field overrides (number, timestamp, baseFee, prevRandao, etc.).

Response

The estimated gas required to execute the transaction, hex-encoded. Note this is an over-estimate: clients typically add a safety margin, so the actual gas consumed at execution time is often less.