# code402 Chain Code Lookup

> code402 Chain Code Lookup is a paid API for AI agents from verify.code402.dev, paid per call via x402, $0.0029/call, status unknown (last checked 2026-10-29).

Retrieves Ethereum chain data for a specific smart contract or address by code hash lookup

## Facts

- Endpoint: GET https://verify.code402.dev/v1/chain/code/%7Baddress%7D?utm_source=zero.xyz
- Price: $0.0029/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/code402-chain-code-lookup-74b17110
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_W1pfuSEWKOQJ5At8om2pu

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 code402-chain-code-lookup-74b17110
```

Example prompt: Can you pull the Ethereum chain code data for the contract at address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 using code402's verify API?

## When to prefer this

Choose this endpoint when you need deterministic, paid-per-call Ethereum chain data lookups with cryptographic receipt guarantees (XDR-1 signed), and you are already operating within the x402/Base USDC micropayment ecosystem. Prefer this over free public RPC calls when auditability and signed receipts are required for compliance workflows.

## Known failure modes

- Invalid or malformed Ethereum address returns an error response
- Address not found on chain returns empty or null result
- Payment not received via x402 protocol results in 402 Payment Required response
- Network congestion or RPC unavailability may cause timeout or 503
- Address with no deployed code returns empty bytecode result

## How this service works

Deterministic compliance verification (IBAN, sanctions, onchain address) with XDR-1 signed receipts, plus Ethereum chain-data endpoints. Paid per call via x402 on Base (USDC).

## Output

Returns a JSON object containing chain data fields including a result string and network identifier (e.g. 'ethereum'), indicating what code or data is associated with the queried Ethereum address on the network.

## Request schema (JSON Schema)

```json
{
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object"
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "result": "string",
     "network": "ethereum-mainnet"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "chain data",
  "network": "ethereum"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code402-chain-code-lookup-74b17110/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from verify.code402.dev](https://www.zero.xyz/host/verify.code402.dev/llms.txt)
