{"uid":"cap_XCXWy3sf4U0rg6YTyMK_S","slug":"agent-data-tools-revmesh2074-workers-dev-ethereum-gas-estimate-020cea9b","name":"Ethereum Gas Estimate","description":"Estimate gas, Ethereum. Estimate the gas a transaction would use on Ethereum (eth_estimateGas) and what it would cost at the current gas price, in gas units, gwei and ETH. Give to, plus value in ETH and calldata for a contract call, and the sender when the call depends on it. Use before sending a transaction or to price a batch; for the gas price alone use eth_gas. A transaction that would revert is 422 with the reason, uncharged.","url":"https://agent-data-tools.revmesh2074.workers.dev/eth/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"],"type":"string"},"queryParams":{"type":"object","required":["to"],"properties":{"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x000000000000000000000000000000000000dEaD"],"description":"0x recipient or contract address"},"data":{"type":"string","examples":["0x"],"description":"Optional 0x calldata for a contract call"},"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"],"description":"0x sender address (default: an empty address)"},"value":{"type":"string","examples":["0"],"description":"Amount of ETH to send, in ETH (default 0)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"to":{"type":"string"},"gas":{"type":"string"},"cost":{"type":"string"},"from":{"type":"string"},"block":{"type":"number"},"chain":{"type":"string"},"value":{"type":"string"},"symbol":{"type":"string"},"chainId":{"type":"number"},"gasPriceGwei":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"to":"0x000000000000000000000000000000000000dEaD","gas":"21000","cost":"0.000000252","from":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","block":123456789,"chain":"Ethereum","value":"0","symbol":"ETH","chainId":1,"gasPriceGwei":"0.012"}},"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_A64VqtFehkZ1rhr_l6DH_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"Estimates the gas units and ETH cost a transaction would consume on Ethereum mainnet using eth_estimateGas, including current gas price in gwei.","exampleAgentPrompt":"Before I send this contract call on Ethereum, can you estimate the gas it would use and what it'll cost in ETH? The contract is 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, my wallet is 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, and the calldata is 0xa9059cbb000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9b0000000000000000000000000000000000000000000000000de0b6b3a7640000.","exampleUseCases":[{"title":"Pre-flight check before ETH transfer","prompt":"I'm about to send 0.5 ETH to 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 from my wallet 0xab5801a7D398351b8bE11C439e05C5B3259aeC9B — can you estimate the gas cost in ETH before I confirm?"},{"title":"Smart contract call gas pricing","prompt":"Can you tell me how much gas the call to 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 would use with calldata 0xd0e30db0, sent from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 and value 0.1 ETH?"},{"title":"Catch reverting transaction before broadcast","prompt":"I want to check if this Ethereum contract call will succeed or revert before I send it — the contract is 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, calldata is 0x38ed1739, and sender is 0xab5801a7D398351b8bE11C439e05C5B3259aeC9B."}],"resultDescription":"Returns a JSON object with: gas (estimated gas units as a string), cost (total cost in ETH as a string), gasPriceGwei (current gas price in gwei), from (sender address used), to (recipient address), value (ETH value), block (block number at estimation time), chain (network name), chainId (numeric chain ID), and symbol (ETH). If the transaction would revert, returns HTTP 422 with the revert reason — and you are not charged.","failureModes":["422 Unprocessable Entity — transaction would revert on-chain, includes revert reason string; not charged","Invalid or malformed 'to' address returns a 400 bad request","Missing required 'to' parameter returns a 400 error","Invalid calldata encoding causes a revert or 400 error","Network congestion or RPC timeout may cause a 503 or delayed response","Insufficient ETH value for payable function triggers a 422 revert"],"whenToPreferThis":"Use this endpoint when you need to know both the gas units AND the ETH cost of a specific Ethereum transaction before broadcasting it, especially for contract calls with calldata. It is preferred over a raw gas price endpoint (eth_gas) when you want an end-to-end cost estimate tied to a real transaction. It is also useful for catching reverts before they hit the network, saving gas on failed transactions. Choose this over on-chain simulation tools when you need a simple HTTP call with no wallet or node setup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T09:52:24.650Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-ethereum-gas-estimate-020cea9b"}