chain_tx_cost
chain_tx_cost — Live cost of a typical transaction on Base, Arbitrum, Optimism, Polygon and Ethereum, side by side: execution fee (gas x current gas price) plus the rollup L1 data fee read from on-chain oracles (OP Stack GasPriceOracle, ArbGasInfo), total in native coin and USD, cheapest chain and how many times cheaper than Ethereum. Params: action (native, erc20, approve, swap, nft), optional gas and bytes (unsigned tx size) to price your exact tx, chains (comma list), pol_usd (to convert Polygon fees). ETH/USD from alternative.me. Price: $0.004 USDC (Base, via x402).
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": {
"action": "<action>"
},
"name": "chain_tx_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | erc20 |