{"uid":"cap_E7Rh6U0nPlZ-tT99dWZtM","slug":"evm-gas-estimation-fa18bac8","name":"EVM Gas Estimation","description":"Estimate the gas a transaction would use, before signing it — Genesis402 / UnyKorn Operator Network","url":"https://twin.unykorn.org/evm-estimate-gas?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"params":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"chain":{"enum":["ethereum","base","polygon","arbitrum","optimism","bsc","avalanche","gnosis","linea","scroll"],"type":"string"},"value":{"type":"string"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"type":"evm-estimate-gas","receipt":{"tx_hash":"0x<64hex>","amount_usd":0.003,"receipt_id":"g402-<16hex>"},"generated_at":"<iso8601>"}},"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_KnfOIoTrxB8Vdnr9iM9LC","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 the gas a transaction would consume on a given EVM chain before it is signed or submitted, using the UnyKorn Operator Network.","exampleAgentPrompt":"Before I sign this transaction, estimate how much gas it would use — it's sending 0.5 ETH from 0xAbCd...1234 to 0xDEaD...5678 on Base with no calldata.","exampleUseCases":[{"title":"Pre-flight check for DeFi swap","prompt":"Before I submit this Uniswap swap on Arbitrum, estimate the gas it'll consume — from address 0xAaAa...1111, calling contract 0xBbBb...2222 with this calldata: 0xa9059cbb000000..."},{"title":"Budget gas costs for contract deployment","prompt":"I'm about to deploy a contract on Ethereum — can you estimate the gas it would take? The sender is 0x1234...abcd, the target is 0x0000...0000, and the deployment bytecode is 0x6080..."},{"title":"Validate transaction before user approval","prompt":"Check how much gas this Polygon transaction would use so I can warn the user before they approve it — from 0xUser...aaaa to 0xContract...bbbb, value is 0, calldata is 0x23b872dd..."}],"resultDescription":"Returns a JSON object with ok=true, the estimation type ('evm-estimate-gas'), a receipt object containing a transaction hash, the cost in USD, and a unique receipt ID, plus an ISO 8601 timestamp of when the estimate was generated.","failureModes":["Invalid or malformed Ethereum address in 'to' or 'from' fields returns a validation error","Unsupported chain name causes rejection — only the enumerated chains are accepted","Malformed or non-hex calldata in 'data' field triggers a pattern mismatch error","Transaction that would revert on-chain may return an error or revert reason","Payment failure via x402 protocol prevents the call from being processed","Network congestion or RPC errors on the target chain may cause timeouts"],"whenToPreferThis":"Choose this endpoint when you need to estimate gas for a transaction on a supported EVM chain (Ethereum, Base, Polygon, Arbitrum, Optimism, BSC, Avalanche, Gnosis, Linea, Scroll) before signing or broadcasting it. It is ideal for agents that need to pre-flight transactions for cost budgeting, UX warnings, or revert detection without committing any funds. Prefer it over raw RPC calls when you want a managed, pay-per-call API with receipts and no node infrastructure to manage.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T18:55:30.186Z","isFirstParty":false,"canonicalSlug":"evm-gas-estimation-fa18bac8"}