estimate_custom_tx_cost
USD cost of a custom gas limit or compute-unit budget. Prices an arbitrary transaction, not just the 3 canned types get_gas_price/compare_gas_costs cover: pass your own gas limit (EVM chains) or compute-unit budget (Solana) and get its USD cost at a speed tier. Use this for a contract call, NFT mint or any tx whose gas usage you already know or estimated via eth_estimateGas/simulation — get_gas_price's 3 canned tx types won't fit it. Typical EVM units: 21,000 plain transfer, 50,000-65,000 ERC20 transfer, 100,000-250,000 typical contract call/NFT mint, 150,000-400,000 DEX swap; typical Solana compute units: 200,000 simple transfer, up to 1,400,000 (the per-tx cap) for a complex instruction. Excludes OP-stack L1 data fee (depends on calldata size, not gas limit) — add a few % for Base/Optimism to be safe. Costs $0.002 USDC per call (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": {
"chain": "<chain>",
"units": "<units>"
},
"name": "estimate_custom_tx_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tier | No | Speed tier | standard |
| chain | Yes | Chain to query | |
| units | Yes | Gas limit (EVM) or compute units (Solana) |