Granite Upgrade Activates in12d:17h:00m:53s
Eth

eth_estimateGas

Returns the lowest gas limit for a transaction to succeed.

POST
/ext/bc/C/rpc#eth_estimateGas

JSON-RPC request

jsonrpcstring
methodstring
params

[transactionObject, blockParameter(optional)]

Items1 <= items <= 2
idinteger

Response Body

application/json

application/json

curl -X POST "https://api.avax.network/ext/bc/C/rpc#eth_estimateGas" \  -H "Content-Type: application/json" \  -d '{    "jsonrpc": "2.0",    "method": "eth_estimateGas",    "params": [      {        "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",        "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",        "value": "0x9184e72a"      }    ],    "id": 1  }'
{
  "jsonrpc": "2.0",
  "result": null,
  "error": {
    "code": 0,
    "message": "string",
    "data": null
  },
  "id": 1
}
{
  "jsonrpc": "2.0",
  "error": {
    "code": 0,
    "message": "string",
    "data": null
  },
  "id": 1
}

Is this guide helpful?