{"uid":"cap_TE40V79INzcJHvAVKKhnw","slug":"sourcify-contract-source-fetcher-25a96c2e","name":"Sourcify Contract Source Fetcher","description":"Fetch the verified Solidity source files and compiler metadata for a contract address from Sourcify's open verification repository. Covers 8 EVM mainnets (ethereum, base, polygon, arbitrum, optimism, bsc, gnosis, celo). Contracts that were never verified return a structured {verified:false} miss, not an error. Feed the returned source into /api/solidity-scan for a heuristic pattern check.","url":"https://agent402.tools/api/contract-source","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":{"match":"exact_match","address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","chainId":8453,"network":"base","sources":{"contracts/FiatTokenProxy.sol":"// SPDX-License-Identifier: MIT …"},"compiler":{"version":"0.6.12","language":"Solidity"},"verified":true,"verifiedAt":"2024-08-08T13:59:29Z","sourceCount":2}},"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_cxe6Q9wMY8eFf0Cjed5fs","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":"Fetches verified Solidity source files and compiler metadata for an EVM contract address from Sourcify's open verification repository across 8 mainnets.","exampleAgentPrompt":"Can you pull the verified Solidity source code and compiler metadata for contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum from Sourcify?","exampleUseCases":null,"resultDescription":"Returns the verified Solidity source files (one or more .sol files) and compiler metadata (compiler version, optimization settings, ABI, etc.) for the specified contract as stored in Sourcify's open verification repository. Returns an error or empty result if the contract was never submitted for verification.","failureModes":["Contract not verified on Sourcify — returns empty or error indicating no verified source exists","Invalid contract address format — rejects non-0x-prefixed or wrong-length addresses","Unsupported network — returns error if a chain not in the supported 8 is specified","Contract exists on-chain but source was never submitted to Sourcify","Network connectivity issues reaching Sourcify's repository"],"whenToPreferThis":"Use this endpoint when you need the verified Solidity source code and compiler metadata for a specific EVM contract address from Sourcify's decentralized open repository, particularly when working across any of the 8 supported mainnets (ethereum, base, polygon, arbitrum, optimism, bsc, gnosis, celo). Prefer this over Etherscan-based alternatives when you want open, decentralized verification data or when targeting chains like Gnosis or Celo.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:07:11.570Z","isFirstParty":false}