For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_estimateGas

POST https://mainnet.valuechain.xyz

Estimates the gas required to execute a transaction.

An estimate reflects current state. The later transaction can still fail. See Gas & Fees.

Parameters

Name
Type
Required
Description

transaction

object

Yes

Same from, to, value, and data that will be submitted.

block

quantity or tag

No

Hex block number, or earliest, latest, safe, finalized, or pending. See block tags.

Result

Gas (quantity): Hex-encoded gas units, not an amount of SOSO.

Example

Response

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

Code examples

cURL

JavaScript

Python

Last updated