JSON-RPCMethods
eth_estimateGas: parameters, returns and CU
Estimate the gas limit a transaction would need. See parameters, return value, CU metering and supported chains for this method.
Summary
Estimate the gas limit a transaction would need.
Compute Units (CU) and Pricing
CU per call
20 CU
Price per 1M calls (USD)
$2
Parameters
| Parameter | Type | Description |
|---|---|---|
transaction | object | Transaction call object that may include from, to, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, value and data/input; it is only simulated and changes no on-chain state. |
blockParameter | QUANTITY|TAG | Optional block number or tag for the estimate: latest, earliest, pending, safe or finalized; defaults to the latest block. |
Returns
- Type:
QUANTITY - Description: Estimated gas amount as a 0x-prefixed hexadecimal quantity.
Notes
The estimate runs against the state of the given block; if the call would revert, clients normally return an error instead of a number.
Request Example
curl -X POST "https://dev-api.blockvectra.network/v1/robinhood_mainnet" \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [
{
"from": "<from>",
"to": "<to>",
"data": "<data>"
},
"latest"
],
"id": 1
}'Supported Chains
Supported chains:
- EthereumBeta
eth_mainnet - HyperEVM
hyperevm_mainnet - Robinhood Chain
robinhood_mainnet
Related references
eth_maxPriorityFeePerGas: parameters, returns and CU
Return the suggested EIP-1559 priority fee per gas in wei. See parameters, return value, CU metering and supported chains for this method.
eth_call: parameters, returns and CU
Execute a read-only call against block state and return the result. See parameters, return value, CU metering and supported chains for this method.