HTTP/1.1 402 PAYMENT REQUIRED agent402.base.eth · BASE · SOLANA · POLYGON · ARBITRUM · ROBINHOOD · USDC · USDG

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

Workflow

  1. 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.
  2. 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.
  3. 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'.
  4. 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.
  5. 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