{"uid":"cap_t90GM4jmhKSSKwDSqxWeg","slug":"contract-abi-lookup-via-sourcify-agent402-tools-05d7ae6e","name":"Contract ABI Lookup via Sourcify (agent402.tools)","description":"Fetch the verified ABI for a contract address from Sourcify, plus a ready-to-use list of human-readable function signatures with their 4-byte selectors. Covers 8 EVM mainnets. Unverified contracts return a structured {verified:false} miss. Pair with /api/calldata-decode to decode transactions against this ABI.","url":"https://agent402.tools/api/contract-abi","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"address":{"type":"string","description":"0x-prefixed 40-char contract address."},"network":{"type":"string","description":"ethereum / base / polygon / arbitrum / optimism / bsc / gnosis / celo (default base)."}}},"responseSchema":{"type":"json","example":{"abi":[{"name":"implementation","type":"function","inputs":[],"outputs":[{"type":"address"}]}],"match":"exact_match","events":[{"signature":"Upgraded(address)"}],"address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","chainId":8453,"network":"base","verified":true,"functions":[{"selector":"0x5c60da1b","signature":"implementation()"}]}},"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_d3aO17ABAk1zjAYiIO50a","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":"Fetches the verified ABI and human-readable function signatures with 4-byte selectors for an EVM smart contract address from Sourcify, across 8 mainnets.","exampleAgentPrompt":"Can you fetch the verified ABI and function signatures for the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum — I need to know what functions it exposes and their 4-byte selectors.","exampleUseCases":null,"resultDescription":"Returns the verified ABI array for the contract, plus a list of human-readable function signatures paired with their 4-byte selectors. If the contract is unverified on Sourcify, returns a structured {verified: false} object indicating a miss.","failureModes":["Contract not verified on Sourcify — returns {verified: false} structured miss","Invalid or malformed contract address — likely 400 or structured error","Unsupported network name — falls back to base or errors","Contract exists but has no source code submitted to Sourcify","Network temporarily unavailable — upstream Sourcify timeout"],"whenToPreferThis":"Use this endpoint when you need to programmatically discover the interface of an EVM smart contract — its ABI, callable functions, and 4-byte selectors — without manually searching Etherscan or other block explorers. Ideal when building agents that need to interact with unknown contracts, decode transaction calldata, or validate a contract's interface before calling it. Covers 8 EVM mainnets including Ethereum, Base, Polygon, Arbitrum, Optimism, BSC, Gnosis, and Celo.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:08:27.965Z","isFirstParty":false}