estimate_gas
Calculate gas needed for Kaia transactions before sending, including contract creation, value transfers, and optional KAIA cost at current gas price.
Instructions
Estimate gas for a transaction (from, to optional for contract creation, value, data). Returns estimated gas and optionally KAIA at current gas price.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Recipient address (omit for contract creation) | |
| data | No | Call data (hex, optional) | |
| from | Yes | Sender address (0x...) | |
| value | No | Value in peb (hex) or KAIA decimal string | |
| network | No | mainnet or kairos (default: mainnet) |