Estimate transaction cost
estimate_transactionEstimates the gas limit and CELO cost of a transaction at the current gas price without signing or sending it. Use it to preview fees before submitting.
Instructions
Estimate the gas limit and CELO cost of a transaction at the current gas price. Nothing is signed or sent.
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": {
"to": "<to>",
"from_address": "<from_address>"
},
"name": "estimate_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The recipient address. | |
| data | No | Hex-encoded calldata. | 0x |
| value | No | CELO to send, in wei. | 0 |
| from_address | Yes | The sender address. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gas_limit | Yes | Estimated gas limit | |
| gas_price | Yes | Current gas price | |
| is_eip1559 | No | Whether EIP-1559 is supported | |
| estimated_cost | Yes | Estimated cost in wei | |
| max_fee_per_gas | No | Max fee per gas (EIP-1559) | |
| estimated_cost_formatted | Yes | Formatted cost in CELO | |
| max_priority_fee_per_gas | No | Max priority fee per gas (EIP-1559) |