Skip to content

eth_estimateGas

Estimates the gas needed for a transaction.

ParameterTypeRequiredDescription
toaddressYesTarget address
datahexNoCall data
{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [
{
"to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"data": "0x18160ddd"
}
],
"id": 1
}
Terminal window
curl -X POST https://arb-mainnet.blockreq.com/v1/rpc/public \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"to":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","data":"0x18160ddd"}],"id":1}'