{"uid":"cap_YAZjgISs54RdpIhSm9CAs","slug":"base-chain-transaction-simulator-1097a3d9","name":"Base Chain Transaction Simulator","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/api/chain/simulate?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"],"type":"string"},"queryParams":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],"description":"Target contract or recipient"},"data":{"type":"string","pattern":"^0x([0-9a-fA-F]{2})*$","description":"Calldata (default 0x)"},"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0xe4be4d0bd82d8e68203deff81f79ede0529f2617"],"description":"Sender (signer) address"},"calls":{"type":"string","description":"URL-encoded JSON array of up to 5 {to,data,value_eth|value} run in order from the same sender"},"value_eth":{"type":"string","examples":["0.01"],"description":"ETH to send, decimal (default 0)"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"from":"0xe4be4d0bd82d8e68203deff81f79ede0529f2617","next":["/crypto/base-gas","/crypto/tx-status?hash="],"block":53272234,"calls":[{"to":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","index":0,"success":true,"function":"transfer(address,uint256)","gas_used":45047,"revert_reason":null}],"chain":"base","flags":[],"fee_eth":5e-7,"fee_usd":0.0019,"success":true,"summary":"1 call succeeds; sender sends 0.001 USDC","verdict":"SAFE_TO_SEND","approvals":[],"transfers":[{"to":"0xa587d73489f8f09d1975f1ddbb1c61c93e8fa9d7","from":"0xe4be4d0bd82d8e68203deff81f79ede0529f2617","token":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","amount":0.001,"symbol":"USDC"}],"gas_used_total":45047,"sender_changes":{"USDC":-0.001},"balance_changes":{"0xa587d73489f8f09d1975f1ddbb1c61c93e8fa9d7":{"USDC":0.001},"0xe4be4d0bd82d8e68203deff81f79ede0529f2617":{"USDC":-0.001}}}},"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_lnIEetgQ1X-D0CP9c5Jic","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":"Simulates one or more Ethereum/Base transactions dry-run style, returning gas usage, token transfers, approvals, balance changes, and a SAFE/UNSAFE verdict before any real funds move.","exampleAgentPrompt":"Before I actually send it, simulate this Base transaction for me: sender 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 calling 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 with calldata 0xa9059cbb... and 0 ETH — tell me if it's safe, how much gas it'll use, and what tokens move.","exampleUseCases":[{"title":"Pre-flight DeFi swap safety check","prompt":"Before I execute this swap on Base, simulate it for me — sender is 0xe4be4d0bd82d8e68203deff81f79ede0529f2617, target contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, calldata is 0xa9059cbb000000000000000000000000a587d73489f8f09d1975f1ddbb1c61c93e8fa9d70000000000000000000000000000000000000000000000000000000000000001, 0 ETH value. Will it succeed, what's the gas cost, and does anything unexpected happen to my balances?"},{"title":"Batch multicall simulation","prompt":"Simulate this batch of 3 calls on Base for me before I submit them — they're all from 0xe4be4d0bd82d8e68203deff81f79ede0529f2617. I want to see if all 3 succeed, total gas used, and a breakdown of every token transfer that happens across the sequence."},{"title":"Suspicious calldata safety audit","prompt":"Someone sent me a transaction to sign on Base — sender 0xe4be4d0bd82d8e68203deff81f79ede0529f2617, target 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, with some calldata I don't recognize. Can you simulate it and tell me the verdict — is it SAFE_TO_SEND or will it drain my wallet?"}],"resultDescription":"Returns a JSON object with: overall success boolean and SAFE_TO_SEND/UNSAFE verdict, decoded function name, gas used and fee in ETH and USD, list of token transfers (from/to/amount/symbol), approval events, per-address balance changes (sender_changes and balance_changes), revert reason if applicable, block number, and suggested next API endpoints for follow-up.","failureModes":["Invalid address format returns 400 validation error","Malformed calldata hex returns parse error","Simulation of a reverted call returns success:false with revert_reason populated","Insufficient balance in simulated state causes revert","Network timeout if Base RPC is congested","Payment failure via x402 if USDC balance insufficient"],"whenToPreferThis":"Use this endpoint when an AI agent needs to verify the safety and outcome of a Base chain transaction before executing it with real funds. Ideal for DeFi agents, wallet assistants, and autonomous trading bots that must confirm gas cost, token flow, and revert risk prior to signing. Prefer over on-chain execution when a dry-run preview is needed, and over generic RPC eth_call when you want decoded human-readable output including transfer breakdowns, verdicts, and USD fee estimates.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:12.601Z","isFirstParty":false,"canonicalSlug":"base-chain-transaction-simulator-0dc73aed"}