Estimate gas for a built EVM swap
estimate_gasEstimate gas costs for unsigned EVM swap transactions without signing or sending. Uses transaction data from build_swap to provide gas estimates.
Instructions
Estimate the gas cost of an unsigned EVM transaction produced by build_swap. Read-only: 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": {
"from": "<from>",
"to": "<to>",
"data": "<data>",
"chain_id": "<chain_id>",
"token_in": "<token_in>"
},
"name": "estimate_gas"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Transaction target — the "to" field from build_swap. | |
| data | Yes | Calldata from build_swap. | |
| from | Yes | Address that would send the transaction. | |
| value | No | Native value as a hex quantity. | 0x0 |
| chain_id | Yes | EVM chain id from build_swap. | |
| token_in | Yes | Address of the input token (zero address for native). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gas_price | Yes | Gas price in wei, decimal string. | |
| estimated_gas | Yes | Gas units, decimal string. | |
| estimated_fee_wei | Yes |