{"uid":"cap_KUpX3LnshpQvvZuPhNERz","slug":"base-transaction-cost-estimator-266789e0","name":"Base Transaction Cost Estimator","description":"Self-computed Base onchain toolkit for AI agents: ERC-20 safety scan, manipulation-resistant TWAP price oracle, gas/fee oracle, calldata decoder, token/address/contract intel, wallet approval-risk audit, and batch token triage — all computed live from raw Base chain, no third-party data.","url":"https://x402-data-api.bodhinindustries.workers.dev/txcost","method":"GET","headers":{},"bodySchema":{"type":"object","required":["to"],"properties":{"to":{"type":"string","description":"Target address of the transaction."},"data":{"type":"string","description":"Calldata hex (omit for a plain ETH transfer)."},"from":{"type":"string","description":"Sender (msg.sender) — recommended for accurate estimates."},"value":{"type":"string","description":"ETH value in wei (integer string)."}}},"responseSchema":{"type":"object","properties":{"to":{"type":"string","description":"target"},"from":{"type":"string","description":"sender (or null)"},"block":{"type":"integer","description":"Base block height"},"chain":{"type":"string","description":"base"},"ethUsd":{"type":"number","description":"self-computed ETH/USD"},"costEth":{"type":"string","description":"expected cost in ETH (or null)"},"costUsd":{"type":"number","description":"expected cost in USD (or null)"},"valueWei":{"type":"string","description":"value in wei"},"computedAt":{"type":"string","description":"ISO-8601 timestamp"},"willRevert":{"type":"boolean","description":"estimateGas reverted"},"gasEstimate":{"type":"string","description":"gas units (or null)"},"gasPriceGwei":{"type":"number","description":"effective gas price used"},"revertReason":{"type":"string","description":"revert reason (or null)"},"thirdPartyDataUsed":{"type":"boolean","description":"always false"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TebC4xDUcb6Xdz3hA2hr8","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates the gas cost of a transaction on Base L2, returning gas units, effective gas price, ETH cost, and USD cost computed live from the chain with no third-party data.","exampleAgentPrompt":"Before I submit this contract call on Base, can you estimate the gas cost — the target is 0x1234...abcd, the calldata is 0xa9059cbb..., and my wallet is 0xabc...def — tell me the gas units, ETH cost, USD cost, and whether it will revert?","exampleUseCases":null,"resultDescription":"Returns the estimated gas units, effective gas price in Gwei, expected cost in ETH and USD (using a self-computed ETH/USD price), the Base block height at time of computation, whether the transaction would revert, the revert reason if any, and a flag confirming no third-party data was used.","failureModes":["Missing 'to' parameter returns a 400 error","Transaction simulation reverts — willRevert is true and revertReason is populated","Invalid address format causes estimation failure","Calldata that triggers out-of-gas errors returns null gasEstimate","Network congestion on Base may cause delayed or stale block data"],"whenToPreferThis":"Use this endpoint when you need a live, self-computed gas cost estimate for a Base L2 transaction without relying on any external price feeds or third-party oracles. It is ideal for pre-flight transaction checks, cost budgeting, revert detection, and building autonomous agents that need trustless fee estimation directly from the Base chain.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:45:25.967Z","isFirstParty":false}