Cheapest rail right now
Where should an agent transact this minute? Live gas on Ethereum + every major L2 side by side, Base gas tiers, a fee estimate for your transaction type, and ETH spot to price it all in dollars.
When to use this pack
An agent about to do REAL onchain work — deploy a contract, move funds, batch-settle, mint — wants to pick the chain and the moment. Gas varies 10-100x between Ethereum and its L2s and swings hour to hour; eyeballing four gas trackers is human work. One call returns the cross-chain comparison, the chosen chain's slow/standard/fast tiers, a per-transaction-type estimate, and the ETH price to convert gwei into dollars. (x402 tool payments themselves are gasless — this pack is for everything else an agent does on-chain.)
Tools in this pack
-
L2 gas comparison
$0.002
POST /api/l2-gas-comparison
Current gas snapshot across Ethereum + supported L2s (Base, Polygon, Arbitrum, Optimism), sorted cheapest-first. Returns gas price in gwei, latest block number, chain id, and an isL2 flag per chain. Use to route a transaction to the cheapest viable L2 or to track L1→L2 gas spread.
-
Gas snapshot (slow / standard / fast)
$0.001
POST /api/gas-snapshot
Live gas price snapshot for a chain — slow / standard / fast tiers in gwei, plus the latest base fee. Sampled from eth_feeHistory (last 4 blocks, 25th/50th/90th percentile priority fees). Use to estimate before broadcasting a transaction from another tool.
-
Gas price
$0.002
GET /api/gas-estimate
Current gas price (gwei and wei) on Base, Polygon, Arbitrum, Optimism, Ethereum, or Robinhood Chain — for an agent budgeting a transaction. Read-only. ?network=base
-
Crypto price
$0.010
GET /api/crypto-price
Live crypto prices for one or many coins in any vs_currency (usd, eur, btc, eth, etc). Returns last price, 24h change %, 24h volume, and market cap per coin. Accepts ticker symbols (BTC, ETH, SOL) for the top ~50 by market cap, or canonical CoinGecko ids (e.g. "render-token") for any of the ~15k tracked coins. Batched: up to 25 coins per call. Backed by CoinGecko's public API — keyless.
Workflow
- l2-gas-comparison with {networks: ["ethereum", "base", "arbitrum", "optimism", "polygon"]} — one row per chain with current gas. This is the headline: sort ascending and you have the cheapest venue.
- gas-snapshot with {network: <the winner>} — slow/standard/fast tiers on the chosen chain. If your action is deferrable, the slow tier is often half the fast tier; note the spread.
- gas-estimate for your transaction type on that chain — a simple transfer, an ERC-20 transfer, and a contract deploy differ by an order of magnitude in gas units; this converts 'gwei is low' into 'this action costs N'.
- crypto-price with {coins: "ETH", currency: "usd"} — multiply units × price × ETH spot to state the cost in dollars, which is the number a budget check actually wants.
- Report: { cheapest: <chain>, comparison: [...], tiers: {...}, estimatedCostUsd, decision: 'act now on <chain>' | 'defer — spread suggests off-peak in a few hours' }.
Run it in Claude
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then paste this prompt into Claude:
Find the cheapest chain for an ERC-20 transfer right now using Agent402 (networks: ethereum,base,arbitrum,optimism,polygon): (1) l2-gas-comparison with that network list — sort by gas ascending. (2) gas-snapshot {network: <cheapest>} — read the standard tier. (3) gas-estimate on that network for an ERC-20 transfer. (4) crypto-price {coins: "ETH", currency: "usd"} — express the final cost in USD. Return {cheapest, gasStandard, estimatedCostUsd, comparison}.
← All skill packs