{"uid":"cap_0DClec8k0qrZ72SzHAg1V","slug":"riley-craig-x402-agent-store-estimate-gas-6313e92a","name":"Riley Craig x402 Agent Store — Estimate Gas","description":"Estimate the gas a transaction will use via eth_estimateGas — the pre-send read every tx-building, trading and settlement agent makes to size gas and avoid out-of-gas reverts. Pass from/to/value/data. Across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. Free public RPC; undercuts onesource at $0.001 on 6 chains.","url":"https://x402-agent-store.rileycraig14.workers.dev/chain/estimate-gas","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["to"],"properties":{"to":{"type":"string","description":"Recipient/contract address (0x...)"},"data":{"type":"string","description":"Calldata (0x...)"},"from":{"type":"string","description":"Sender address (0x...)"},"chain":{"type":"string","description":"base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"},"value":{"type":"string","description":"Wei value, hex or decimal (default 0)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"gas":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"gas":21000,"chain":"base"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.09","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.09/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Q35lu5pDL51c9rDQuS0CH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.09","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates the gas units required for an EVM transaction on Base, Ethereum, Optimism, Arbitrum, Polygon, or Gnosis — payable per call in USDC via x402, no API key needed.","exampleAgentPrompt":"What's the estimated gas for a transaction from 0xAbCd...1234 to the Uniswap router at 0x1234...5678 with calldata 0xa9059cbb... and zero ETH value on Base?","exampleUseCases":null,"resultDescription":"Returns a JSON object with the estimated gas units (e.g. {\"gas\": 21000, \"chain\": \"base\"}) — the raw unit count required to execute the transaction, not converted to ETH or USD.","failureModes":["Invalid or missing 'to' address returns an error response","Unsupported chain string returns an error or falls back to Base","Malformed calldata may cause estimation to fail or return an inflated estimate","Insufficient USDC balance or payment failure blocks the request with a 402","RPC node unavailability may cause timeouts or 5xx errors","If the transaction would revert on-chain, gas estimation may fail with an execution error"],"whenToPreferThis":"Use this endpoint when an AI agent needs a quick, on-demand gas estimate for any EVM-compatible chain without managing RPC credentials or API keys. Ideal for pre-flight checks before submitting transactions, cost estimation in DeFi workflows, or validating that a smart contract call won't run out of gas. The pay-per-call x402 model makes it suitable for ephemeral agent usage without subscription overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:30:45.858Z","isFirstParty":false}