{"uid":"cap_5aVMzHnoeuqkc8Pu9INzw","slug":"saylor-innovations-gas-estimate-ethereum-5da37877","name":"Saylor Innovations Gas Estimate (Ethereum)","description":"Gas Estimate (ethereum) — On-Chain Data","url":"https://saylorinnovations.com/api/evm/ethereum/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","POST","PUT","PATCH","DELETE","HEAD"],"type":"string"},"queryParams":{"type":"object","properties":{"to":{"type":"string","description":"0x target (query)"},"data":{"type":"string","description":"optional 0x calldata (query)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["chain","reverted"],"properties":{"gas":{"type":["number","null"]},"chain":{"type":"string"},"error":{"type":["string","null"]},"native":{"type":"string"},"reverted":{"type":"boolean"},"est_fee_native":{"type":["string","null"]},"gas_price_gwei":{"type":["number","null"]}}}}}}},"responseSchema":null,"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_QHECAY_Lwd439LFSArse2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates gas usage and fee cost for a transaction on the Ethereum mainnet, returning gas units, gas price in gwei, and estimated native fee.","exampleAgentPrompt":"What's the estimated gas and ETH fee for calling the Ethereum contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 with calldata 0xa9059cbb000000000000000000000000abc...?","exampleUseCases":[{"title":"Pre-flight DeFi swap cost check","prompt":"Before I swap tokens on Uniswap on Ethereum mainnet, can you estimate the gas and ETH fee for calling the router contract at 0xE592427A0AEce92De3Edee1F18E0157C05861564 with my swap calldata 0x414bf389...?"},{"title":"Smart contract deployment cost estimate","prompt":"I want to know how much gas and ETH it'll cost to deploy my contract — can you estimate the gas for sending calldata 0x6080604052... to the Ethereum zero address?"},{"title":"Revert check before on-chain vote","prompt":"Can you check if my governance vote transaction to contract 0x408ED6354d4973f66138C91495F2f2FCbd8724C3 with calldata 0x56781388... will revert on Ethereum, and give me the estimated gas if it won't?"}],"resultDescription":"Returns a JSON object with the chain name ('ethereum'), estimated gas units as a number (or null if failed), current gas price in gwei, estimated transaction fee in native ETH, a boolean indicating if the transaction would revert, and an error string if applicable.","failureModes":["Invalid or non-existent 'to' address returns an error message with reverted=true","Malformed calldata causes simulation failure with error detail","Transaction that would revert on-chain returns reverted=true and gas=null","Network congestion or RPC unavailability may result in timeout or null gas values","Missing required 'to' parameter returns a validation error"],"whenToPreferThis":"Use this endpoint when you need a quick, paid on-chain gas estimate for Ethereum mainnet specifically — particularly when you want both the gas unit count and the current gwei price together with the native ETH fee in a single call, and when you also want to know upfront whether the transaction would revert before executing it.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T00:48:46.486Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-gas-estimate-ethereum-5da37877"}