{"uid":"cap_jqTvS4YEGwHTxfCbF-yIe","slug":"base-onchain-tools-simulate-token-transfer-015af43d","name":"Base Onchain Tools – Simulate Token Transfer","description":"Eleven read-only endpoints answering questions about Base mainnet that are tedious to assemble from raw RPC: what an unverified contract is actually able to do, whether a token transfer will revert and for what reason, what an arbitrary token is worth, and whether an address is safe to pay. Priced $0.001-$0.04 per call in USDC over x402. No account, no API key, no signup, no minimum, no rate limit to negotiate — the payTo address in the 402 response is the whole integration. Failed calls are not billed. The payment middleware cancels settlement on any 4xx or 5xx, so a malformed parameter or an upstream outage costs nothing. Answers are read live from Base mainnet at request time, with failover across five independent RPC providers. A batch that comes back incomplete is treated as a failure rather than returned with the missing entries as zeros, because a confident wrong answer costs a caller more than an error does. Scope is deliberately narrow: Base mainnet only, reads only, no keys held, nothing stored between requests.","url":"https://base-onchain-tools.dolerite.workers.dev/v1/base/simulate-transfer?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","required":["from","to","amount"],"properties":{"to":{"type":"string","description":"Recipient address"},"from":{"type":"string","description":"Address the tokens leave"},"token":{"type":"string","description":"Optional ERC-20 contract, defaults to USDC on Base"},"amount":{"type":"string","description":"Amount in atomic units (for USDC, 1000000 = $1)"},"spender":{"type":"string","description":"Optional: simulate transferFrom pulled by this spender instead of a direct transfer"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"revert":{"kind":"Error(string)","reason":"ERC20: transfer amount exceeds balance"},"verdict":"would-fail","blockers":["sender holds 0 USDC but is sending 1"],"would_succeed":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.008","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.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fKVWUkehi_IHFSfbcSmCC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Simulates an ERC-20 or native token transfer on Base mainnet and returns whether it would succeed or revert, with the exact revert reason and a human-readable list of blockers.","exampleAgentPrompt":"Before I send 500 USDC from 0xAbC...123 to 0xDeF...456 on Base, simulate the transfer and tell me if it would succeed or exactly why it would revert.","exampleUseCases":[{"title":"Pre-flight check before paying a vendor","prompt":"I'm about to send 250 USDC from my wallet 0xAbC...111 to the vendor at 0xDeF...222 on Base — can you simulate the transfer first and tell me if it'll go through, or what's blocking it?"},{"title":"Diagnose a stuck delegated withdrawal","prompt":"My protocol is trying to pull 1000000 USDC (that's $1) from user address 0x111...aaa using spender 0x222...bbb on Base — simulate that transferFrom and tell me the exact revert reason so I can fix it."},{"title":"Validate a payment bot before deploying","prompt":"Before I turn on my auto-payment bot, simulate a transfer of 5000000 atomic units of the token at contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 from 0xBot...000 to 0xRecip...999 on Base and confirm it would succeed."}],"resultDescription":"A JSON object with: `verdict` ('would-succeed' or 'would-fail'), `would_succeed` boolean, `revert` object containing `kind` (e.g. 'Error(string)') and `reason` (the revert message string), and `blockers` — a human-readable array explaining why the transfer would fail (e.g. insufficient balance, missing allowance). On success, `revert` and `blockers` will be absent or empty.","failureModes":["Malformed or missing `from`, `to`, or `amount` parameters returns a 4xx error (not billed)","Invalid ERC-20 contract address causes upstream call failure (not billed)","Upstream RPC provider outage across all five providers causes a 5xx (not billed)","Incomplete batch result treated as failure rather than partial data (not billed)","Amount expressed in decimal instead of atomic units may produce misleading results (user error)"],"whenToPreferThis":"Use this endpoint when you need a cheap, reliable pre-flight check before submitting a token transfer on Base mainnet — especially in payment pipelines, bots, or user-facing UIs where a reverting transaction would waste gas or cause confusion. It is purpose-built for Base mainnet reads with no API key or account required, costs only $0.008 per call (billed only on success), and returns machine-parseable revert reasons plus human-readable blockers. Prefer it over raw eth_call simulation when you want structured, interpreted results rather than raw hex revert data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:37:47.289Z","isFirstParty":false,"canonicalSlug":"base-onchain-tools-simulate-token-transfer-015af43d"}