# chain-contract-code

> chain-contract-code is a paid API for AI agents from chain.intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-02).

Checks if an Ethereum-compatible address is a smart contract, returning bytecode size, EIP-1967 proxy implementation address, and EIP-7702 delegation info across multiple chains.

## Facts

- Endpoint: GET https://chain.intel.rallylive.ca/chain/code?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chain-contract-code-857d6db1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4ajNE272nWkGoMiQMk7a_

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 chain-contract-code-857d6db1
```

Example prompt: Is the address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 a smart contract on Ethereum, and if it's a proxy, what's its implementation address?

## When to prefer this

Use this endpoint when you need to determine whether an address is a smart contract vs an EOA, or when you need to resolve proxy contract implementation addresses (EIP-1967) or EIP-7702 delegation targets across EVM chains including Base, Ethereum, Arbitrum, Optimism, Polygon, and BSC. Prefer this over general blockchain explorers when you need programmatic, structured data for agent workflows at low cost ($0.01/call).

## Known failure modes

- Invalid or malformed address returns an error
- Unsupported chain prefix returns an error
- Address not found on the specified chain returns empty/null bytecode size
- Network timeout or RPC unavailability causes failure
- Missing required input parameter returns a 400-level error

## How this service works

Is this address a contract? Bytecode size, EIP-1967 proxy implementation and EIP-7702 delegation. Default chain Base; prefix another: ethereum:, arbitrum:, optimism:, polygon:, bsc:. $0.01 per call.

## Output

Returns whether the address has deployed bytecode (is a contract), the size of that bytecode, the EIP-1967 proxy implementation address if applicable, and EIP-7702 delegation target if present — all for the specified chain (defaults to Base).

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "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/chain-contract-code-857d6db1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chain.intel.rallylive.ca](https://www.zero.xyz/host/chain.intel.rallylive.ca/llms.txt)
