Estimate gas
estimate_gasRead-onlyIdempotent
Estimates the gas a transaction would use (eth_estimateGas) and what it would cost at the node's current gas price: fee = gas × gas price, in wei and LAX. Takes the same call fields as call_contract (to, from, value_wei, and data or function+args) and nothing is sent. A plain LAX transfer uses 21,000 gas. Fails with the revert reason when the transaction would revert.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | contract address | |
| abi | No | contract ABI as a JSON string; when omitted the explorer's verified ABI is used | |
| args | No | function arguments as a JSON array; big integers as decimal strings | |
| data | No | raw 0x-hex calldata; alternative to function+args | |
| from | No | sender address (optional) | |
| block | No | block number, hash or "latest" (default) | |
| function | No | function name resolved via abi or the verified ABI, or a full signature such as "balanceOf(address) returns (uint256)" | |
| value_wei | No | LAX to send with the call, in wei (decimal) |