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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from": "<from>"
},
"name": "estimate_gas"
}
}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) |