{"uid":"cap_VBKHTgEMtUdTaYhux5xPH","slug":"evm-gas-estimator-estimate-gas-usage-and-cost-58195542","name":"EVM Gas Estimator — Estimate Gas Usage and Cost","description":"Estimate the gas a transaction will use (eth_estimateGas) and its cost at the current gas price, or the revert reason if it would fail. Nothing is sent. Works on Base, Ethereum, Arbitrum, Optimism, Polygon, BNB Chain, Avalanche, Gnosis, Linea, Scroll, Sonic and Unichain.","url":"https://api.vextorium.com/evm-estimar-gas-pago?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string"},"de":{"type":"string"},"red":{"enum":["base","ethereum","arbitrum","optimism","polygon","bnb","avalanche","gnosis","linea","scroll","sonic","unichain"],"type":"string","description":"Chain (default base)"},"datos":{"type":"string"},"valor":{"type":"number"}}},"responseSchema":{"type":"json","example":{"red":"base","nativo":"ETH","ejecutable":true,"gas_estimado":30989,"coste_estimado":1.859e-7,"gas_recomendado":37186,"precio_gas_gwei":0.006}},"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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tDNZNMVnoAeMe8YekdBnV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates how much gas a transaction will consume and its cost at the current gas price across 12 EVM chains, returning the revert reason if the transaction would fail.","exampleAgentPrompt":"Before I submit anything, estimate how much gas it would cost to send 0.1 ETH from 0xAbC...123 to 0xDeF...456 on Base — tell me the gas units, gas price in gwei, and the total ETH cost.","exampleUseCases":[{"title":"Pre-flight DeFi swap cost check","prompt":"I want to swap tokens on Arbitrum but before I do anything, can you estimate the gas cost for calling this contract — from 0xSenderAddr to 0xUniswapRouter with this calldata 0xa9059cbb... — so I know if it's worth doing right now?"},{"title":"Detect reverting transaction before sending","prompt":"I'm about to submit a transaction from 0xMyWallet to 0xContractAddr on Polygon, but I'm worried it might fail — can you simulate it and tell me if it would revert and why?"},{"title":"Cross-chain gas cost comparison","prompt":"Can you estimate the gas cost for the same transaction — from 0xSender to 0xRecipient with calldata 0xabcdef — on both Optimism and Ethereum so I can compare which is cheaper right now?"}],"resultDescription":"Returns a JSON object with: whether the transaction is executable (true/false), estimated gas units, recommended gas units (with buffer), current gas price in gwei, estimated cost in the chain's native token, the chain name, and the native token symbol. If the transaction would revert, the revert reason is returned instead.","failureModes":["Invalid sender or recipient address returns an error","Transaction would revert — response includes revert reason instead of gas estimate","Unsupported chain specified returns a validation error","Missing required fields (de or a) returns a schema validation error","Network congestion or RPC unavailability may cause timeouts","Malformed calldata (datos field) causes simulation failure"],"whenToPreferThis":"Use this endpoint when you need to pre-flight check a transaction before submitting it, verify it won't revert, or calculate expected gas costs across 12 supported EVM chains without any risk of sending anything on-chain. Prefer this over live gas price endpoints when you also need per-transaction simulation rather than just current network gas prices.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:41:48.163Z","isFirstParty":false,"canonicalSlug":"evm-gas-estimator-estimate-gas-usage-and-cost-58195542"}