Eth estimateGas

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.

post

Request body sample: {"jsonrpc":"2.0","method":"eth_estimateGas","params":[{ "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567" }, "latest"],"id":1}

Body
idintegerOptional
jsonrpcstringOptional
methodstringOptional
Responses
200
OK
application/json
post
POST / HTTP/1.1
Host: eth_estimateGas
Content-Type: application/json
Accept: */*
Content-Length: 53

{
  "id": 1,
  "jsonrpc": "text",
  "method": "text",
  "params": []
}
200

OK

{
  "id": 1,
  "jsonrpc": "text",
  "result": "text"
}