# Ethereum/EVM Contract Source & ABI Fetcher

> Ethereum/EVM Contract Source & ABI Fetcher is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Fetches verified source code, ABI, compiler settings, and metadata for any deployed smart contract on Ethereum, Base, Optimism, Arbitrum, or Polygon.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/contract-source?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-f977c240
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VvHjtxAF6YHYlHEbuxR5J

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 x402-deployer-x402-deployer-workers-dev-f977c240 -d '<json body>'
```

Example prompt: Can you fetch the verified source code, ABI, and proxy implementation address for the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum mainnet?

## When to prefer this

Use this endpoint when you need to programmatically inspect a deployed smart contract's source code, ABI, or deployment metadata across major EVM chains without manually navigating Etherscan or similar explorers. Ideal for agents building contract interaction logic, auditing contracts, decoding transaction data, or verifying a contract's implementation before interacting with it.

## Known failure modes

- Contract address not found on specified chain — returns not_found or unverified status
- Contract exists but source is not verified on the block explorer — is_verified: false with limited data
- Invalid or malformed contract address — returns validation error
- Unsupported chain specified — returns error indicating supported networks
- Block explorer API rate limit or downtime — returns upstream error

## How this service works

Verified contract source code / Etherscan source / contract ABI fetcher / Solidity source lookup. For any deployed contract on Ethereum, Base, Optimism, Arbitrum, or Polygon: returns is_verified, contract name, compiler version, parsed ABI, full source, license, optimizer settings, constructor args, and proxy implementation address.

## Output

Returns a JSON object with is_verified (boolean), contract name, compiler version, full parsed ABI array, complete Solidity source code, SPDX license identifier, optimizer settings (enabled/runs), constructor arguments (hex-encoded), and proxy implementation address if applicable.

## 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",
    "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"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-f977c240/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
