{"uid":"cap_SDAYY3Pmwc-SnqCS2fJxI","slug":"x402engine-evm-transaction-simulator-751b452f","name":"x402engine EVM Transaction Simulator","description":"x402engine — Simulate EVM transactions before sending — get gas estimates, execution traces, and revert reasons","url":"https://x402engine.app/api/tx/simulate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"type":"object","required":["network_id","from","to"],"properties":{"to":{"type":"string","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","description":"Recipient/contract address"},"gas":{"type":"number","description":"Gas limit"},"data":{"type":"string","description":"Transaction calldata (hex string)"},"from":{"type":"string","example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","description":"Sender address"},"value":{"type":"string","example":"0","description":"ETH value in wei"},"network_id":{"type":"string","example":"1","description":"Network ID (1=mainnet, 8453=Base, 10=Optimism, etc.)"}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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_xluZ6IrOGM4DWt7e6yOff","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Simulates an EVM transaction before broadcast, returning gas estimates, execution traces, and revert reasons","exampleAgentPrompt":"Before I send this transaction, can you simulate it on Ethereum mainnet — I'm calling the USDC contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 with this calldata and tell me the gas estimate and whether it would revert?","exampleUseCases":[{"title":"Debug a reverting DeFi transaction","prompt":"My swap transaction keeps failing — can you simulate it on Ethereum mainnet from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 to the Uniswap router at 0xE592427A0AEce92De3Edee1F18E0157C05861564 with this calldata and tell me the exact revert reason?"},{"title":"Estimate gas before a contract deployment","prompt":"Before I deploy this contract, simulate the transaction on Base (network ID 8453) from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 to 0x0000000000000000000000000000000000000000 with my bytecode as calldata and give me an accurate gas estimate."},{"title":"Validate a token approval call","prompt":"Can you dry-run an ERC-20 approve call for me on Optimism (network ID 10) — from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 to the USDC contract, with the approval calldata, and confirm it won't revert before I actually send it?"}],"resultDescription":"Returns a simulation result including predicted gas usage, full execution trace of EVM opcodes and calls, and if applicable a decoded revert reason explaining why the transaction would fail — all without submitting anything to the blockchain.","failureModes":["Invalid or malformed address returns a validation error","Unsupported network_id returns an error indicating the chain is not available","Malformed calldata hex string causes a simulation failure","Insufficient gas limit causes the simulation to revert with out-of-gas","Contract state at simulation time may differ from broadcast time, leading to stale results","Payment failure ($0.01 USDC not provided) results in HTTP 402 rejection"],"whenToPreferThis":"Choose this endpoint when you need to pre-flight an EVM transaction on any supported chain (mainnet, Base, Optimism, etc.) before actually broadcasting it — ideal for catching reverts, estimating gas accurately, or debugging calldata without spending real gas or risking failed on-chain transactions. Prefer this over node-level eth_call when you also want structured execution traces and decoded revert reasons in a single pay-per-call API without managing RPC infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-06T06:46:27.117Z","isFirstParty":false,"canonicalSlug":"x402engine-evm-transaction-simulator-751b452f"}