Home

Estimate Gas for Transaction

POST
https://linea.nownodes.io/

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Changed. A call that sets blobVersionedHashes or authorizationList must include to. Without it the node rejects the request with an error (missing "to" in blob transaction or authorizationList provided for contract creation, but "to" field is missing).

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

Body

application/json

JSON-RPC request envelope.

jsonrpcstring2.0required

JSON-RPC protocol version.

methodstringeth_estimateGasrequired

JSON-RPC method name.

paramsArray<object | string>required

The transaction call object and an optional block tag.

Show child attributes
One of
fromstring

Address initiating the transaction or call.

tostring

Destination address, or null for contract creation.

gasstring

Gas limit supplied for the transaction or call.

gasPricestring

Gas price in wei per gas.

maxFeePerGasstring

Maximum total fee per gas offered by the transaction.

maxPriorityFeePerGasstring

Maximum priority fee per gas offered by the transaction.

valuestring

Native ETH amount transferred, in wei as a hexadecimal quantity.

datastring

Hex-encoded call data or log data.

noncestring

Sender transaction count used to order this transaction.

Optional block identifier.

string
idintegerrequired

Identifier echoed in the response.

Response

200OK

Estimated gas amount