{"uid":"cap_BIUC9KVHAFHBEmjc9o1_J","slug":"evm-transaction-gas-estimator-bd8b1678","name":"EVM Transaction Gas Estimator","description":"Simulate a transaction before signing: runs `eth_estimateGas` for `{ to, from?, data?, value? }` and returns the estimated gas units and estimated fee (current gas price x gas, in wei + ETH). If the node rejects the call it returns `ok:false` with the decoded `revertReason` (why it would fail) instead of erroring. Reads live on-chain state with automatic endpoint fallback.","url":"https://chain.openverbs.com/v1/gas-estimate","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Destination address (contract or wallet)."},"data":{"type":"string","pattern":"^0x([0-9a-fA-F]{2})*$","description":"Calldata hex (optional; e.g. an ERC-20 transfer)."},"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Sender address (optional; affects state-dependent estimates)."},"chain":{"enum":["ethereum","base","arbitrum","optimism","polygon"],"type":"string","description":"EVM chain to query. One of: ethereum, base, arbitrum, optimism, polygon. Default \"ethereum\"."},"value":{"type":"string","description":"Native value in wei, decimal or 0x-hex (optional)."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"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_XQRjdJnhJRB4aVcZaiPO-","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":"Simulates an EVM transaction using eth_estimateGas and returns estimated gas units and fee in wei/ETH, or a decoded revert reason if the transaction would fail.","exampleAgentPrompt":"Before I sign, can you simulate this ERC-20 transfer on Base — from 0xAbC...123 to 0xDeF...456 with calldata 0xa9059cbb... — and tell me the estimated gas units and fee in ETH?","exampleUseCases":[{"title":"Pre-flight check on contract call","prompt":"I'm about to call a DeFi contract on Arbitrum — from 0x1111111111111111111111111111111111111111 to 0x2222222222222222222222222222222222222222 with calldata 0x095ea7b3... — can you estimate the gas cost and let me know if it'll revert?"},{"title":"Debug a failing transaction","prompt":"My transaction keeps failing — it's from 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA to 0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB on Ethereum with data 0xdeadbeef. Can you simulate it and tell me the revert reason?"},{"title":"Cost estimate for ETH transfer","prompt":"How much gas and ETH fees will a plain ETH transfer of 100000000000000000 wei cost if I send from 0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC to 0xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD on Polygon?"}],"resultDescription":"Returns a JSON object with ok:true and the estimated gas units (integer) plus the estimated fee expressed both in wei and in ETH at the current gas price. If the node rejects the simulated call, returns ok:false with a human-readable revertReason explaining why the transaction would fail, without throwing an error.","failureModes":["Transaction simulation reverts — returns ok:false with decoded revertReason instead of gas estimate","Invalid address format — request rejected before reaching the node","Unsupported chain value — must be one of ethereum, base, arbitrum, optimism, polygon","Node endpoint unavailable — automatic fallback attempted, but if all nodes fail the request errors","Malformed calldata hex — rejected if data does not match ^0x([0-9a-fA-F]{2})*$ pattern","Value field unparseable — must be decimal integer or 0x-prefixed hex string"],"whenToPreferThis":"Choose this endpoint when you need to pre-validate or cost-estimate an EVM transaction before signing and broadcasting, especially when you want a decoded revert reason on failure rather than a raw RPC error. Prefer it over raw eth_estimateGas RPC calls because it adds automatic node failover, fee conversion to ETH, and graceful revert decoding. Use it across Ethereum, Base, Arbitrum, Optimism, and Polygon. Not suitable for Bitcoin or non-EVM chains.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:41:25.855Z","isFirstParty":false}