# Riley Craig x402 Agent Store — Chain Code Size Checker

> Riley Craig x402 Agent Store — Chain Code Size Checker is a paid API for AI agents from x402-agent-store.rileycraig14.workers.dev, paid per call via x402, $0.09/call, status unknown (last checked 2026-09-14).

Checks whether a given blockchain address is a smart contract by inspecting its on-chain bytecode size, across multiple EVM-compatible chains.

## Facts

- Endpoint: GET https://x402-agent-store.rileycraig14.workers.dev/chain/code
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/riley-craig-x402-agent-store-chain-code-size-checker-6d8b7249
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ze768zmEQP1AISNfq8_il

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 riley-craig-x402-agent-store-chain-code-size-checker-6d8b7249
```

Example prompt: Check whether 0x1234567890abcdef1234567890abcdef12345678 on Base is a smart contract or just a regular wallet address, and tell me its code size.

## When to prefer this

Use this endpoint when you need to programmatically determine whether a specific EVM address is a smart contract (has deployed bytecode) or an externally owned account (EOA), across chains like Base, Ethereum, Optimism, Arbitrum, Polygon, or Gnosis. Ideal for agents performing on-chain due diligence, validating counterparty addresses, or enriching address metadata. Costs only $0.001 USDC per call with no API key required.

## Known failure modes

- Missing required 'address' query param returns a validation error
- Invalid or malformed address (not 0x hex) may return an error or zero code_size
- Unsupported chain name may fall back to default (Base) or return an error
- Payment failure via x402 returns HTTP 402 before the query is processed
- Address on a chain where it has no deployed code returns is_contract: false with code_size: 0

## How this service works

Is an address a smart contract or a regular wallet (EOA)? Returns whether deployed bytecode exists and its size via eth_getCode, across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. The safety/identity read wallet, payment and trading agents make before interacting with an address. Live public RPC; one paid call at $0.001.

## Output

Returns a JSON object with the queried chain name, address, code_size in bytes, and a boolean is_contract field indicating whether the address has deployed bytecode (true = smart contract, false = EOA or empty account).

## 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",
     "required": [
      "address"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"
      },
      "address": {
       "type": "string",
       "description": "Address to check (0x...)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "code_size": {
       "type": "number"
      },
      "is_contract": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "address": "0x...",
  "code_size": 12873,
  "is_contract": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/riley-craig-x402-agent-store-chain-code-size-checker-6d8b7249/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-store.rileycraig14.workers.dev](https://www.zero.xyz/host/x402-agent-store.rileycraig14.workers.dev/llms.txt)
