{"uid":"cap_1GhtdDstwW-jZ9N7uWO_8","slug":"axiom-works-gas-estimator-eth-estimategas-437b7d6a","name":"Axiom Works Gas Estimator (eth_estimateGas)","description":"Estimate gas for a transaction before signing (eth_estimateGas) plus current fee → cost in native coin; returns the revert reason if it would fail. Example: {from:\"0xd8dA…6045\", to:\"0x8335…2913\", data:\"0xa9059cbb…\", chain:\"base\"}. $0.002.","url":"https://api.axiomworks.co.uk/chain/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}$","description":"Recipient/contract"},"data":{"type":"string"},"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Sender"},"chain":{"enum":["base","ethereum","arbitrum","optimism","polygon"],"type":"string","description":"EVM chain (default base)"},"value":{"type":"string","description":"Wei (decimal)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"gas":{"type":"number"},"est_fee":{"type":"string"},"would_revert":{"type":"boolean"}}}}}}},"responseSchema":{"type":"json","example":{"chain":"base","error":"Rate limit exceeded. To obtain higher limits, please request a personal token or a dedicated node: https://www.allnodes.com/publicnode","source":"eth_estimateGas","chain_id":8453,"would_revert":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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_H8UL_VvGQAC7xmamtyBnX","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 the gas cost for an EVM transaction before signing, returning estimated fee in native coin and the revert reason if the transaction would fail.","exampleAgentPrompt":"Before I sign this token transfer, can you estimate the gas and total fee for sending from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 to 0x83352B327c8ef5B85fa1b89f4D2BEA940A592913 with calldata 0xa9059cbb… on Base, and let me know if it would revert?","exampleUseCases":[{"title":"Pre-flight ERC-20 transfer on Base","prompt":"Before I send this USDC transfer on Base, estimate the gas and fee and tell me if it would revert — from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 to 0x833502F9E374A44b1Ef8a1E2D2913b6E7AB52913 with calldata 0xa9059cbb0000000000000000000000008335…"},{"title":"Simulate failing contract call to get revert reason","prompt":"I'm trying to call a smart contract on Ethereum from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 to 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D with data 0x38ed1739… — can you simulate it and tell me if it would revert and why?"},{"title":"Cost estimate for Polygon DeFi swap","prompt":"Can you estimate how much gas and what fee in MATIC I'd pay to call this swap function on Polygon? The transaction is from 0xAbCd…1234 to 0xDEFa…5678 with calldata 0x12345678… and 0 value."}],"resultDescription":"A JSON object containing the estimated gas units, estimated fee expressed as a string in native coin, a boolean would_revert flag indicating if the transaction would fail, and if so the revert reason. Also includes the chain name and chain ID. On rate-limit or RPC error, returns an error message and would_revert: true.","failureModes":["Rate limit from public RPC node returns would_revert: true with an error message pointing to Allnodes","Invalid or malformed 'to' address returns a validation error","Transaction that would genuinely revert on-chain returns would_revert: true with revert reason","Unsupported chain value returns schema validation error","Missing required 'to' parameter returns 400-level error"],"whenToPreferThis":"Use this endpoint when you need a quick, inexpensive ($0.002) pre-flight gas estimate for EVM transactions on Base, Ethereum, Arbitrum, Optimism, or Polygon — especially when you also want automatic revert detection with reason strings. Prefer it over raw RPC calls when you need a simple REST API without managing node connections, and when detecting transaction failures before signing is a priority.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T12:35:16.472Z","isFirstParty":false,"canonicalSlug":"axiom-works-gas-estimator-eth-estimategas-437b7d6a"}