{"uid":"cap_PQe_9ye-sZF_7pqWopAMl","slug":"evm-contract-source-abi-fetcher-4043d5c4","name":"EVM Contract Source & ABI Fetcher","description":"Fetch a verified smart-contract's full source, ABI, compiler settings and NatSpec docs for an EVM address, and automatically resolve a proxy to its implementation so the response also carries the implementation ABI. One call returns everything an audit or integration agent needs to understand the contract, keyless and pay-per-call. Unverified contracts are reported honestly.","url":"https://api.agentstools.dev/contract/source","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"address":{"type":"string","description":"Contract address, 0x + 40 hex"},"network":{"enum":["base","ethereum","arbitrum","optimism","polygon","bnb"],"type":"string","description":"EVM network (default base)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.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_sE_gcKp0uK-zmIVCaj_JO","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":"Fetches verified smart contract source code, ABI, compiler settings, NatSpec docs, and proxy implementation ABI for any EVM address across major networks.","exampleAgentPrompt":"Can you pull the full source code, ABI, and NatSpec docs for the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum — and if it's a proxy, also give me the implementation ABI?","exampleUseCases":[{"title":"DeFi protocol integration prep","prompt":"I need to integrate with the USDC contract on Base at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 — can you get me the ABI and source code, and resolve the proxy implementation if there is one?"},{"title":"Smart contract security audit","prompt":"I'm auditing the contract at 0x1111111254EEB25477B68fb85Ed929f73A960582 on Ethereum — fetch me the verified source, compiler settings, and NatSpec documentation so I can review it."},{"title":"Check if contract is verified on Polygon","prompt":"Is the contract at 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 on Polygon verified? If so, give me its ABI and source code."}],"resultDescription":"Returns the contract's verified Solidity source code, full ABI, compiler settings (version, optimization flags), NatSpec documentation, and — for proxy contracts — automatically resolves to the implementation and includes its ABI as well. Unverified contracts are reported as such rather than silently failing.","failureModes":["Contract address not verified on the requested network — returns honest unverified status rather than partial data","Invalid or malformed address (not 0x + 40 hex) — returns validation error","Network not supported — returns error for chains outside base/ethereum/arbitrum/optimism/polygon/bnb","Proxy resolution failure — implementation address cannot be determined from known proxy patterns","Network timeout or block explorer API unavailability — returns service error","Rate limiting or payment failure via x402 protocol — returns 402 or payment-related error"],"whenToPreferThis":"Choose this endpoint when an agent needs the full contract source, ABI, compiler metadata, and NatSpec in a single call without managing API keys for Etherscan or similar block explorers. Especially valuable for audit or integration workflows where proxy resolution is needed automatically. Prefer over block explorer REST APIs when operating in a keyless, pay-per-call (x402) agentic context across multiple EVM networks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:01:43.397Z","isFirstParty":false}