v1

latestOpenAPI 3.0.02026-07-26541677.9 KB
Ethereum API

eth_estimateGas

Estimates the amount of gas needed to execute a call

post/eth_estimateGas

Request body

jsonrpcstring required

JSON-RPC version

methodstring required

The method to call

idinteger required

Request identifier

Response

Returns the estimated gas amount

jsonrpcstring
idinteger
resultstring

The estimated amount of gas needed

Example response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x5cec"
}