{"uid":"cap_1qdU6XltIJMSN0s38FdvQ","slug":"phantom-api-megaeth-gas-estimate-ac708ab8","name":"Phantom API — MegaETH Gas Estimate","description":"Lightning-fast access to blockchain data, smart contract insights, and Web3 infrastructure across 57+ networks. Pay-per-call via x402.","url":"https://phantom-api-omega.vercel.app/api/megaeth/gas/estimate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"string"},"data":{"type":"string"},"from":{"type":"string"},"value":{"type":"string"}}},"responseSchema":null,"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_I7ehE_9pEN2nwjdOMD01q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates gas cost for a transaction on the MegaETH network given recipient, calldata, sender, and value","exampleAgentPrompt":"Estimate the gas needed to call this contract on MegaETH — the recipient is 0xAbC...123, the calldata is 0xa9059cbb...000, sent from 0xDef...456 with a value of 0 ETH.","exampleUseCases":[{"title":"Pre-flight check before token transfer","prompt":"Before I send this ERC-20 transfer on MegaETH, can you estimate the gas cost? The 'to' is 0x1234...abcd, 'from' is 0xdead...beef, calldata is 0xa9059cbb000...0001, and value is 0."},{"title":"Smart contract deployment cost check","prompt":"I'm about to deploy a smart contract on MegaETH — can you estimate the gas it'll use? Here's the bytecode as the data field, from address 0xABC...111, no recipient address needed, and value is 0."},{"title":"DeFi swap gas estimation","prompt":"Estimate the gas for a Uniswap swap call on MegaETH — the router contract is 0xROUTER...XYZ, my wallet is 0xMYWALLET...ABC, here's the swap calldata 0x38ed1739..., and the ETH value is 0.05."}],"resultDescription":"Returns a gas estimate (in gas units) for the described transaction on the MegaETH network, allowing agents to forecast transaction costs and determine if sufficient funds are available before broadcasting.","failureModes":["Invalid or malformed address in 'to' or 'from' fields returns an error","Malformed or non-hex calldata causes a parse error","Transaction simulation reverts (e.g. insufficient balance, bad calldata) returns a revert error","Network unavailability or RPC timeout causes a service error","Missing required fields may return a validation error"],"whenToPreferThis":"Use this endpoint when you need a fast, pay-per-call gas estimate specifically on the MegaETH network without managing your own RPC node. Prefer this over general-purpose Ethereum gas estimators when targeting MegaETH specifically, and over subscription-based node providers when you want usage-based pricing via x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:43:44.609Z","isFirstParty":false}