POST
/
eth_estimateGas
curl --request POST \
  --url https://api.mainnet.abs.xyz/eth_estimateGas \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "to": "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
      "data": "0x"
    }
  ]
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x5cec"
}

Body

application/json
jsonrpc
string
default:2.0
required

JSON-RPC version

method
string
default:eth_estimateGas
required

The method to call

params
any[]
required

Parameters for gas estimation

id
integer
default:1
required

Request identifier

Response

200 - application/json
Returns the estimated gas amount
jsonrpc
string
Example:

"2.0"

id
integer
Example:

1

result
string

The estimated amount of gas needed

Example:

"0x5cec"