{"uid":"cap_FMuFOOUQMpyjNXgghGf_e","slug":"contract-source-code-lookup-sourcify-7eb60d8a","name":"Contract Source Code Lookup (Sourcify)","description":"Get the verified Solidity/Vyper source code for a deployed contract by address, sourced from Sourcify. Returns every source file (path + content), the contract name, language, compiler version and compiler settings (optimizer, evmVersion) — the full human-readable source an agent needs to read, audit or feed to an LLM. Supports Ethereum, Base, Arbitrum, Optimism, Polygon. Unverified contracts return `verified:false`. Live reads with cache fallback.","url":"https://chain.openverbs.com/v1/source?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"chain":{"enum":["ethereum","base","arbitrum","optimism","polygon"],"type":"string","description":"EVM chain to query. One of: ethereum, base, arbitrum, optimism, polygon. Default \"ethereum\"."},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Deployed contract address."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.006","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.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BZ8C0qBwfj_PBkGCiTlp6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches verified Solidity/Vyper source code, compiler settings, and metadata for a deployed smart contract address from Sourcify across major EVM chains.","exampleAgentPrompt":"Can you pull up the verified Solidity source code for the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum, including its compiler version and optimizer settings?","exampleUseCases":[{"title":"Smart contract security audit","prompt":"I need to audit the contract at 0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9 on Ethereum — can you fetch its verified Solidity source code so I can review it for vulnerabilities?"},{"title":"LLM-powered contract analysis","prompt":"Get me all the source files for the contract 0x4Fabb145d64652a948d72533023f6E7A623C7C53 on Binance — wait, it's on Ethereum — so I can feed them to a language model and understand what it does."},{"title":"Verify compiler settings before deployment","prompt":"Before I deploy a similar contract, can you check what compiler version and optimizer settings were used for the contract at 0x6B175474E89094C44Da98b954EedeAC495271d0F on Ethereum?"}],"resultDescription":"Returns a JSON object indicating whether the contract is verified. If verified, includes an array of all source files (each with a file path and full source content), the contract name, the programming language (Solidity or Vyper), the compiler version, and compiler settings such as optimizer enabled/runs and evmVersion. If unverified, returns verified:false with no source data.","failureModes":["Contract not verified on Sourcify — returns verified:false with no source files","Invalid or malformed contract address (not 0x + 40 hex chars) — validation error","Chain not supported (outside ethereum/base/arbitrum/optimism/polygon) — enum validation error","Contract address does not exist on the specified chain — empty or not-found response","Network timeout reaching chain RPC or Sourcify — falls back to cache, may return stale data","Payment failure for x402 microtransaction — request rejected before execution"],"whenToPreferThis":"Use this endpoint when you need the full human-readable source code of a deployed smart contract for auditing, LLM analysis, or understanding contract logic — especially when you need compiler settings and all source files together. Prefer this over block explorer scraping because it returns structured JSON with Sourcify-verified data across five major EVM chains in a single call. Best when the contract is likely verified (popular DeFi/NFT protocols almost always are). If you only need the ABI or bytecode, a different endpoint may be more efficient.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:32:16.211Z","isFirstParty":false,"canonicalSlug":"contract-source-code-lookup-sourcify-7eb60d8a"}