# Contract Source & ABI

> Contract Source & ABI is a paid API for AI agents from www.x402financialdata.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns verified Solidity source code, parsed ABI, compiler metadata, and proxy implementation address for an Ethereum contract from Etherscan V2

## Facts

- Endpoint: GET https://www.x402financialdata.com/contract-source/:address
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/contract-source-abi-4e1c2656
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Wj-mn5elXlIEKG7_IDc4Y

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability contract-source-abi-4e1c2656
```

Example prompt: Can you pull the verified source code and ABI for the Ethereum contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 — and if it's a proxy, tell me the implementation address too?

## When to prefer this

Choose this endpoint when you need verified Solidity source, a parsed ABI, or compiler metadata for a specific Ethereum contract address — especially when you need automatic proxy detection to find the real implementation behind upgradeable contracts. Prefer it over raw Etherscan API calls when you need a clean, pre-parsed single response with proxy resolution included and are operating in an x402 payment context.

## Known failure modes

- Invalid or malformed contract address returns an error
- Contract address that is an EOA (externally owned account) rather than a contract may return empty or error
- Rate limiting or upstream Etherscan API downtime may cause failures
- Only Ethereum mainnet ('eth') is supported; other chains will return an error
- Payment failure or insufficient USDC balance returns a 402 response

## How this service works

Verified contract source code, parsed ABI, and compiler metadata for a contract address on Ethereum, from Etherscan's V2 API -- including proxy detection with the implementation contract address, so you're not left guessing why a proxy's own source looks empty. An unverified contract returns verified=false with null source/ABI rather than an error. $0.01/call.

## Output

Returns a JSON object with: verified (boolean), source code (full Solidity text or null if unverified), parsed ABI array (or null), compiler version and settings metadata, whether the contract is a proxy, and the proxy's implementation contract address if applicable. Unverified contracts return verified=false with null source and ABI rather than an error.

## Request schema (JSON Schema)

```json
{
 "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"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "description": "EVM contract address"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "chain": {
       "enum": [
        "eth"
       ],
       "type": "string",
       "description": "Which chain to query. Only 'eth' is supported right now."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/contract-source-abi-4e1c2656/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.x402financialdata.com](https://www.zero.xyz/host/www.x402financialdata.com/llms.txt)
