{"uid":"cap_taa_w7BB1OD03lcfcXagA","slug":"writerslogic-calldata-decode-567e91a6","name":"WritersLogic Calldata Decode","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/calldata-decode?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"abi":{"type":"array","items":{"description":"JSON ABI fragment object or human-readable signature string."},"maxItems":200,"minItems":1,"description":"Fragments of the contract ABI (JSON objects or human-readable strings)."},"data":{"type":"string","maxLength":40002,"description":"0x-prefixed hex, whole bytes; up to 20000 bytes."},"mode":{"enum":["call","return","error","event"],"type":"string","description":"Default call: data is selector plus arguments."},"topics":{"type":"array","items":{"type":"string","maxLength":66},"maxItems":4,"description":"mode event: 0x topics, topic0 first."},"function":{"type":"string","maxLength":200,"description":"mode return: function name or signature."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pyfaz0jF6Xl1702EKb-U4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Decodes Ethereum hex calldata, return data, revert data, or event logs against a caller-supplied ABI using ethers, with strict re-encode validation.","exampleAgentPrompt":"I have this raw hex calldata from a transaction I'm about to sign — can you decode it against this ABI so I can see exactly which function is being called and what the arguments are? The data is 0xa9059cbb000000000000000000000000deadbeef...0000000000000000000000000000000000000000000000000de0b6b3a7640000 and the mode is 'call'.","exampleUseCases":[{"title":"Pre-sign transaction inspection","prompt":"Before I approve this transaction, decode the calldata 0x23b872dd000000000000000000000000abc...123 against this ERC-20 ABI so I can confirm which function is being called and what the from, to, and amount arguments are — I want to make sure nothing fishy is going on."},{"title":"Failed transaction revert analysis","prompt":"My contract call just reverted with this hex error data: 0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000134552433230496e73756666696369656e74000000000000000000000000000000. Decode it in 'error' mode so I can read the revert reason string."},{"title":"Event log parameter decoding","prompt":"I have an event log from a Uniswap Swap event — the topics are ['0xd78ad95f...', '0x000...router', '0x000...recipient'] and the data is 0x0000...amounts. Decode it in 'event' mode against this ABI so I can see the exact amountIn, amountOut, and other fields."}],"resultDescription":"Returns the decoded fields as named parameters with their values and types, plus any strict re-encode validation warnings such as trailing bytes, dirty padding, or non-canonical offsets. If the selector is not found in the provided ABI, the endpoint returns an 'unknown' status rather than an error.","failureModes":["Selector not present in provided ABI — returns unknown status","Malformed or non-0x-prefixed hex data — returns parse error","ABI fragments that don't match the data structure — decode mismatch error","Trailing bytes or dirty padding detected — flagged as validation warning but still decoded","Missing required 'function' field when mode is 'return' — validation error","Data exceeds 20,000 byte limit — rejected with size error","Empty or missing ABI array — rejected with schema validation error"],"whenToPreferThis":"Use this endpoint when an AI agent needs to decode Ethereum transaction calldata, return data, revert data, or event logs purely from a caller-supplied ABI — especially when you need strict validation of encoding correctness (trailing bytes, dirty padding, non-canonical offsets). Prefer this over on-chain simulators or block explorers when you want a fast, deterministic, offline decode without network calls or ABI fetching. It is ideal for pre-sign transaction inspection workflows and post-failure revert analysis where you already have the ABI.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:38:58.548Z","isFirstParty":false,"canonicalSlug":"writerslogic-calldata-decode-567e91a6"}