{"uid":"cap__Qime9gnIT1yXJPBzs2xn","slug":"base-mainnet-gas-estimator-0891b92c","name":"Base Mainnet Gas Estimator","description":"Gas estimate for a Base mainnet swap or any other call (to/from/value/data) via eth_estimateGas, without broadcasting a transaction.","url":"https://x402.agentindex.world/base/estimate-gas?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"string","title":"To"},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data","default":null},"value_wei":{"type":"integer","title":"Value Wei","default":0},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address","default":null}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GjSGbEk_8heZBFSKbXjeO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates gas required for a transaction or contract call on Base mainnet using eth_estimateGas, without broadcasting the transaction.","exampleAgentPrompt":"Before I send this swap transaction, estimate how much gas it'll use on Base mainnet — the call goes to 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD with calldata 0x3593564c... and I'm sending 0 ETH from 0xYourWalletAddress.","exampleUseCases":[{"title":"Pre-flight check for DeFi swap","prompt":"Before I submit this Uniswap swap on Base, estimate the gas for a call to 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD with the swap calldata 0x3593564c000... from my wallet 0xAbC123... sending 0 wei, so I know if it's worth proceeding."},{"title":"Validate contract deployment cost","prompt":"Can you estimate how much gas it'll cost to deploy this contract on Base mainnet? The to address is 0x0000000000000000000000000000000000000000, my deployer is 0xDEF456..., value is 0 wei, and here's the bytecode as calldata: 0x6080604052..."},{"title":"Check ETH transfer gas on Base","prompt":"How much gas would a plain ETH transfer of 500000000000000000 wei from 0xSender... to 0xRecipient... cost on Base mainnet? No calldata needed."}],"resultDescription":"Returns the estimated number of gas units required to execute the specified transaction or call on Base mainnet, computed via eth_estimateGas without actually broadcasting the transaction. This lets agents budget for gas costs, detect likely reverts, and validate transaction feasibility before committing on-chain.","failureModes":["Transaction would revert on-chain — eth_estimateGas returns an error if the simulated call would fail (e.g. insufficient token balance, access control rejection)","Invalid address format for 'to' or 'from_address' — returns a validation or RPC error","Malformed calldata — may cause revert simulation or RPC error","Network congestion or RPC node unavailability — request may time out or return an error","Missing required 'to' field — returns a 422 or bad request error"],"whenToPreferThis":"Use this endpoint when you need a gas estimate specifically for Base mainnet (Coinbase's L2) before submitting a transaction. Prefer this over generic Ethereum gas estimators when you're operating on Base. Ideal for pre-flight checks in DeFi agents, smart contract deployment pipelines, or any workflow where you want to validate feasibility and budget gas costs without risking a failed on-chain transaction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T12:33:42.885Z","isFirstParty":false,"canonicalSlug":"base-mainnet-gas-estimator-0891b92c"}