{"uid":"cap_ZnEx-lOEZ8-XrkYDvml9v","slug":"x402-gateway-production-up-railway-app-2f23bad4","name":"EVM Transaction Simulator","description":"Simulate EVM transactions before sending — get gas estimates, execution traces, and revert reasons","url":"https://x402-gateway-production.up.railway.app/api/tx/simulate","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":{"request":{"to":"0x1111111254fb6590cd080b51a51f1d88f6d121a0","data":"0x","from":"0x3333333333333333333333333333333333333333","value":"0","chainId":1},"response":{"logs":[],"trace":{"to":"0x1111111254fb6590cd080b51a51f1d88f6d121a0","gas":9223372036854754000,"from":"0x3333333333333333333333333333333333333333","hash":"0xcf7634532eaf7f0cd0e50d9d261f317884b60be485e5f43c0f78099f07484ff8","calls":null,"input":"0x","value":"0","output":"0x","address":"0x3333333333333333333333333333333333333333","gas_used":0,"call_type":"CALL","caller_op":"CALL","caller_pc":0,"network_id":"1","nonce_diff":[{"dirty":"1","address":"0x3333333333333333333333333333333333333333","original":"0"}],"to_balance":"0","function_op":"CALL","function_pc":0,"block_number":25326726,"from_balance":"6875369135801233","contract_name":"Unverified","intrinsic_gas":21000,"decoded_output":null,"block_timestamp":"2026-06-16T01:15:08Z","storage_address":"0x0000000000000000000000000000000000000000","absolute_position":0},"gasUsed":21000,"success":true}},"exampleRequest":{"to":"0x1111111254fb6590cd080b51a51f1d88f6d121a0","data":"0x","from":"0x3333333333333333333333333333333333333333","value":"0","chainId":1},"tags":["x402"],"displayCostAmount":"0.010000","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.010000/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_0lg0FMiygH5aKBWUxzmDC","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":"Simulate an EVM transaction before sending — returns gas estimates, execution traces, revert reasons, and state diffs","exampleAgentPrompt":"Before I send this transaction, can you simulate it on Ethereum mainnet — it's a call from 0x2222...2222 to 0x1111...1a0 with calldata 0xabcdef and value 0 ETH — tell me the gas estimate, whether it reverts, and the execution trace?","exampleUseCases":null,"resultDescription":"Returns a simulation result including: total gas used, full execution call trace (nested CALL/DELEGATECALL tree with inputs/outputs), emitted logs, nonce and balance diffs, decoded output if ABI available, block number and timestamp of simulation, and any revert reason if the transaction would fail.","failureModes":["Invalid or missing 'to'/'from' address — 400 bad request","Unsupported chainId — simulation may fail or return incorrect results","Malformed calldata hex string — trace returns empty or error","Insufficient context for revert decoding — revert reason returned as raw hex","Service unavailable — 5xx from upstream simulation provider","Payment failure — x402 payment not accepted or insufficient USDC balance"],"whenToPreferThis":"Use this endpoint when you need to pre-flight an EVM transaction before submitting it on-chain — especially to catch reverts, estimate gas accurately, or inspect execution traces without spending gas. Prefer this over on-chain submission when testing contract interactions, debugging DeFi calls, or validating calldata correctness. Best for Ethereum mainnet (chainId 1) simulations with full trace detail.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:57:50.104Z","isFirstParty":false}