{"uid":"cap_oY1YXRmF1yBC3zp3Iab0V","slug":"gas-estimate-49d5f633","name":"Gas Estimate","description":"Estimate the gas a transaction will use (eth_estimateGas) and its cost at the current gas price, with a 20% buffer; fails clearly when the call would revert. Use before signing.","url":"https://bess-x402.onrender.com/v1/evm/estimate-gas?utm_source=zero.xyz","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["to"],"properties":{"to":{"type":"string","description":"Recipient or contract"},"data":{"type":"string","description":"0x calldata (optional)"},"chain":{"type":"string","description":"ethereum, base, arbitrum, optimism or polygon"},"value_eth":{"type":"number","description":"Native amount to send"},"from_address":{"type":"string","description":"Sender (optional)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7kNmX-aC0Wlrtp_kUvsdn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates gas usage and cost for an EVM transaction (eth_estimateGas) with a 20% safety buffer, and fails clearly if the call would revert.","exampleAgentPrompt":"Before I sign, estimate the gas and total cost for sending 0.5 ETH to 0xAbC123... on Base — include the 20% buffer so I know the safe limit to set.","exampleUseCases":[{"title":"Pre-sign gas check for ETH transfer","prompt":"Estimate the gas cost for sending 1 ETH to 0x742d35Cc6634C0532925a3b844Bc454e4438f44e on Ethereum mainnet before I sign anything."},{"title":"Contract call revert detection","prompt":"I want to call this contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum with calldata 0xa9059cbb000000... — can you estimate the gas and tell me if the call would revert?"},{"title":"DeFi transaction fee budgeting on Arbitrum","prompt":"What's the estimated gas usage and cost in ETH for this swap calldata 0x38ed1739... going to 0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506 on Arbitrum, with the 20% safety buffer included?"}],"resultDescription":"Returns the estimated gas units the transaction will consume, the current gas price, the total cost with a 20% buffer applied, and — if the transaction would revert — a clear error with the revert reason rather than a misleading gas figure.","failureModes":["Transaction would revert: endpoint returns a clear revert reason instead of a gas estimate","Invalid or unsupported chain name: request fails with a validation error","Malformed calldata or invalid address: returns an error describing the bad input","Network timeout or RPC node unavailability: returns a service error","Missing required 'to' parameter: returns a schema validation error"],"whenToPreferThis":"Use this endpoint when you need a quick, safe gas estimate before signing any EVM transaction — especially when sending ETH, invoking a contract, or passing calldata — across Ethereum, Base, Arbitrum, Optimism, or Polygon. The built-in 20% buffer and revert detection make it superior to raw eth_estimateGas calls for agent workflows that need to avoid failed transactions or out-of-gas errors.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T12:33:11.453Z","isFirstParty":false,"canonicalSlug":"gas-estimate-49d5f633"}