{"uid":"cap_IOB3Zw4hGirfsMPhhqJWa","slug":"x402-audit-calldata-encoder-4b9af4fd","name":"x402-audit Calldata Encoder","description":"Pay-per-call on-chain API for AI agents and developers: wallet audits, token safety audits (honeypot detection), live gas prices, token prices, transaction receipts, balances, ENS resolution, block data, ERC-20 allowances, transaction simulation, swap quotes and multicall batches — all computed on-chain via public RPCs (no external market API). Pay per request in USDC on Base via the x402 exact scheme (EIP-3009 transferWithAuthorization). No API key, no signup, no subscription.","url":"https://x402-audit.tatschluizguilherme.workers.dev/encode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":null,"responseSchema":{"type":"json","example":{"fn":"transfer","args":{"to":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","value":"1000000"},"verify":{"args":["0xd8da6bf26964af9d7eed9e03e53415d37aa96045","1000000"],"name":"transfer","known":true,"nested":null,"argsNamed":{"to":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","value":"1000000"},"signature":"transfer(address,uint256)","decodeError":false},"network":"offline","calldata":"0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa9604500000000000000000000000000000000000000000000000000000000000f4240","selector":"0xa9059cbb","inputSize":68,"signature":"transfer(address to, uint256 value)","requestedAt":"2026-08-05T09:00:00.000Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","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.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QeW0ix4jpRdeIchy961cU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes EVM function calls (by name or 4-byte selector + JSON arguments) into raw ABI-encoded calldata hex, with built-in round-trip decode verification, requiring no RPC or API key.","exampleAgentPrompt":"Encode the calldata for an ERC-20 transfer call — function name 'transfer', with recipient address 0xAbCd...1234 and amount 1000000 (as a JSON object) — and show me the resulting hex plus the round-trip verification so I can confirm what it will execute before I sign.","exampleUseCases":[{"title":"Prepare ERC-20 approve calldata","prompt":"Encode calldata for the 'approve' function with spender 0xDef...5678 and amount 500000000 as JSON arguments, then show me the hex and the decoded round-trip verification so I know exactly what I'm signing."},{"title":"Build swap calldata for a DEX trade","prompt":"I need the raw calldata hex for a 'swapExactTokensForTokens' call — amountIn 1000000, amountOutMin 990000, path [0xToken1, 0xToken2], to 0xMyWallet, deadline 9999999999 — give me the encoded hex and show me the verify output so I can double-check it."},{"title":"Encode multicall transaction payload","prompt":"Can you encode a 'multicall' function call with a positional array of two encoded sub-calls as bytes, and return the full calldata hex with the embedded round-trip decode so I can verify what the multicall will execute?"}],"resultDescription":"Returns a JSON object containing the raw ABI-encoded calldata hex string ready to use in a transaction, the 4-byte function selector, and a 'verify' field showing the decoded round-trip interpretation of the calldata (function name and resolved argument values) so the caller can confirm correctness before signing. No RPC connection or API key is required.","failureModes":["Unknown function name not in the ~40-function dictionary returns an error — use the 4-byte selector instead","Malformed JSON arguments (wrong types, missing required fields) return an encoding error","Passing an invalid or unrecognized 4-byte selector with no matching ABI entry may fail or return partial data","Providing positional array arguments in wrong order causes silent mis-encoding — round-trip verify field helps catch this","Network errors to the Cloudflare Worker edge node may cause timeouts"],"whenToPreferThis":"Choose this endpoint when you need to construct raw EVM calldata offline (no RPC, no blockchain access) for any of the ~40 common DeFi/ERC-20 functions, especially when you want immediate built-in verification via the round-trip decode. Prefer it over manual ABI encoding libraries when operating in an environment without Web3 tooling, or when you want a single HTTP call that both encodes and verifies correctness. Not suitable for arbitrary custom contract ABIs outside the built-in dictionary.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T00:41:16.206Z","isFirstParty":false,"canonicalSlug":"x402-audit-calldata-encoder-4b9af4fd"}