Home

Estimate Gas for Transaction

POST
https://fil.nownodes.io/

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Changed. Big-integer quantity fields (value, gasPrice, maxFeePerGas) must be canonical 0x-prefixed unsigned hex of at most 256 bits. Negative values, values without the 0x prefix, values with leading zeros (for example 0x00 or 0x01) and values over 256 bits are now rejected with an error; before, they were accepted. Encode zero as 0x0. A parameter decoding error now returns JSON-RPC error code -32602 (invalid params).

Simulates a transaction and returns an estimate of how much gas would be used.

Malformed numeric values in big-integer fields (for example value or gasPrice) are now rejected with an error; before, they were silently decoded as zero.

Body

application/json
jsonrpcstringrequired

JSON-RPC protocol version

methodstringrequired

The method name

paramsArray<object | string>required

The transaction call object and an optional block tag.

Show child attributes
One of
fromstring

Address the transaction is sent from (optional)

tostringrequired

Destination address of the call

gasstring

Gas limit provided for execution (optional)

gasPricestring

Gas price in wei (optional)

valuestring

Amount of ETH to send, in hexadecimal wei (optional)

datastring

The compiled input data for the transaction (optional)

Optional block tag (e.g., "latest", "earliest", or a block number)

string
idintegerrequired

Request identifier

Response

200OK

Estimated gas amount