Estimate gas, Base
base_estimate_gasEstimate the gas a transaction would use on Base (eth_estimateGas) and what it would cost at the current gas price, in gas units, gwei and ETH. Give to, plus value in ETH and calldata for a contract call, and the sender when the call depends on it. Use before sending a transaction or to price a batch; for the gas price alone use base_gas. A transaction that would revert is 422 with the reason, uncharged. Example: to=0x000000000000000000000000000000000000dEaD. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | 0x recipient or contract address | |
| data | No | Optional 0x calldata for a contract call | |
| from | No | 0x sender address (default: an empty address) | |
| value | No | Amount of ETH to send, in ETH (default 0) |