{"uid":"cap_D3Yf7QNeJbq0pV05JbQqM","slug":"onchainexpat-contract-decoder-api-69a11361","name":"OnchainExpat Contract Decoder API","description":"Pay-per-request AI, crypto, proxy, and utility APIs using x402 protocol","url":"https://x402.onchainexpat.com/api/x402-crypto/contract-decoder","method":"POST","headers":{},"bodySchema":{"type":"object","required":["address"],"properties":{"chain":{"type":"string","description":"Blockchain (default: base)"},"address":{"type":"string","description":"Contract address (0x + 40 hex chars)"}}},"responseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"chain":{"type":"string"},"address":{"type":"string"},"analysis":{"type":"object","description":"AI-generated analysis including summary, purpose, key_functions, security_notes, risk_level"},"verified":{"type":"boolean"},"explorer_url":{"type":"string","description":"Link to view contract on block explorer"},"contract_name":{"type":"string"},"risk_analysis":{"type":"object","description":"Pattern-based risk analysis with flags and risk_score"}}},"success":{"type":"boolean"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eNAg3yFpkd6VVzd9czvAt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Decodes and analyzes smart contract data, ABIs, or transaction calldata using pay-per-request x402 protocol","exampleAgentPrompt":"Can you decode this smart contract calldata for me? I have a raw hex transaction input — 0xa9059cbb000000000000000000000000abcdef... — and I want to know which function it's calling and what the parameters are.","exampleUseCases":[{"title":"Monitor suspicious wallet transactions","prompt":"I'm seeing some weird transactions from a wallet I'm tracking. Can you decode what these contract calls are actually doing? I've got the raw calldata from a few transactions and need to understand if they're token transfers, swaps, or something else entirely."},{"title":"Audit smart contract interaction history","prompt":"I want to review all the function calls made to our contract over the past week. I have the transaction calldata from our logs, but it's all hex encoded. Can you decode each one and tell me what functions were called and with what parameters?"},{"title":"Debug DeFi protocol integration issues","prompt":"Our app is calling a Uniswap contract, but something's going wrong. I have the calldata we're sending, but I need to verify it's actually structured correctly. Can you decode it and confirm the function name and all the parameters match what we intended?"}],"resultDescription":"Returns a JSON object with decoded smart contract data including function name, parameter names and values, ABI fragments, and human-readable interpretation of the calldata or contract interaction.","failureModes":["Invalid or malformed calldata hex returns a parse error","Unknown contract ABI with no verified source may return incomplete decoding","Unsupported blockchain network returns an error","Missing required input fields returns a 400 validation error","Payment not received via x402 protocol returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need to decode raw EVM smart contract calldata, understand what a transaction is doing, or interpret contract interactions without setting up your own ABI parsing infrastructure. Ideal for pay-per-use blockchain data decoding without API key management.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:50:08.356Z","isFirstParty":false}