{"uid":"cap_I5yOsjNsZMs2ZcTjdexCX","slug":"contract-source-abi-lookup-200eb4d8","name":"Contract Source & ABI Lookup","description":"Returns verified source code and ABI for any deployed contract on Ethereum, Base, Optimism, Arbitrum, or Polygon. Includes is_verified, contract name, compiler version, parsed ABI, full source, license, optimizer settings, constructor args, and proxy implementation address. Use it as an Etherscan source lookup, contract ABI fetcher, or Solidity source lookup.","url":"https://x402.agentutility.ai/contract-source?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["address"],"properties":{"chain":{"enum":["base","ethereum","polygon","arbitrum","optimism"],"type":"string","description":"EVM chain. Default 'base'. Other supported: 'ethereum', 'polygon', 'arbitrum', 'optimism'."},"address":{"type":"string","description":"0x-prefixed 20-byte EVM contract address."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"abi":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"inputs":{"type":"array"},"outputs":{"type":"array"},"stateMutability":{"type":"string"}}}},"name":{"type":"string"},"chain":{"type":"string"},"proxy":{"type":"boolean"},"source":{"type":"string"},"address":{"type":"string"},"license":{"type":"string"},"is_verified":{"type":"boolean"},"source_code":{"type":"string"},"optimization":{"type":"object","properties":{"runs":{"type":"integer"},"enabled":{"type":"boolean"}}},"compiler_version":{"type":"string"},"constructor_arguments":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"abi":[{"name":"deposit","type":"function","inputs":[],"outputs":[],"stateMutability":"payable"},{"name":"withdraw","type":"function","inputs":[{"name":"wad","type":"uint256"}],"outputs":[],"stateMutability":"nonpayable"}],"name":"WETH","chain":"base","proxy":false,"source":"https://etherscan.io","address":"0x4200000000000000000000000000000000000006","license":"None","is_verified":true,"source_code":"pragma solidity ^0.4.18;\ncontract WETH9 { ... }","optimization":{"runs":200,"enabled":false},"compiler_version":"v0.4.18+commit.9cf6e910","constructor_arguments":""}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__2PkeAlQt5hrklmxhT9Un","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns verified source code, parsed ABI, compiler settings, and proxy info for any deployed contract on Ethereum, Base, Optimism, Arbitrum, or Polygon.","exampleAgentPrompt":"Can you fetch the verified source code and ABI for the contract at 0x4200000000000000000000000000000000000006 on Base?","exampleUseCases":[{"title":"DeFi protocol integration setup","prompt":"I need the full ABI and Solidity source for the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum — I want to know what functions it exposes so I can integrate with it."},{"title":"Proxy implementation discovery","prompt":"Can you check if the contract at 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0 on Ethereum is a proxy, and if so, return the implementation address and its ABI?"},{"title":"Contract verification audit","prompt":"Is the contract at 0x1F98431c8aD98523631AE4a59f267346ea31F984 on Polygon verified? If so, show me the compiler version, optimizer settings, and license it was deployed with."}],"resultDescription":"A JSON object containing: is_verified (boolean), contract name, chain, address, parsed ABI array (with function names, inputs, outputs, and state mutability), full Solidity source code, license string, compiler version, optimization settings (runs and enabled), constructor arguments, and a proxy flag with implementation address if applicable. Also includes the source explorer URL.","failureModes":["Contract address not found on the specified chain — returns is_verified: false or error","Contract exists but is not verified on the block explorer — source_code and ABI will be empty or null","Invalid 0x address format — returns a validation error","Unsupported chain value — returns an enum validation error","Block explorer API rate limits or downtime — may return a timeout or upstream error"],"whenToPreferThis":"Use this endpoint when you need verified Solidity source code, a parsed ABI, or compiler metadata for a deployed contract across Ethereum, Base, Optimism, Arbitrum, or Polygon — without managing your own Etherscan API keys or multi-chain explorer integrations. It's ideal for agents that need to dynamically discover contract interfaces at runtime, audit contract code, or resolve proxy implementations before calling a contract.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T19:07:08.672Z","isFirstParty":false,"canonicalSlug":"contract-source-abi-lookup-200eb4d8"}