# Crypto Microdata – Chain Code Inspector (x402)

> Crypto Microdata – Chain Code Inspector (x402) is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Returns ERC20/contract metadata for a given on-chain address on Base or Ethereum: kind, proxy type, owner, flags, token info, and suggested next endpoints.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/api/chain/code?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-microdata-chain-code-inspector-x402-7f97c9cb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_J7TESpUlX4JOB6nfhNGq6

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 crypto-microdata-chain-code-inspector-x402-7f97c9cb
```

Example prompt: What kind of contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base — is it a proxy, who owns it, and are there any admin risk flags I should know about?

## When to prefer this

Use this endpoint when you need a quick, structured snapshot of what a contract address actually is before interacting with it — especially for risk assessment (proxy type, admin flags, owner) and token metadata (name/symbol/decimals). Prefer it over raw RPC calls when you want pre-parsed risk flags and suggested next steps, and when you want a pay-per-call model with no API key setup. Not ideal if you need live price data (use the multi-venue price endpoint) or full audit-level security analysis.

## Known failure modes

- Invalid address format (must be 0x + 40 hex chars) → 400 error
- Address is not a deployed contract → is_contract: false, limited metadata
- Unsupported chain value → 400 or default to Base
- Payment not received (x402 flow incomplete) → 402 Payment Required
- Network timeout reading on-chain data → 5xx or partial response
- Rate limiting or worker overload → 503

## How this service works

Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.

## Output

A JSON object with: `kind` (e.g. ERC20), `chain`, `address`, `is_contract`, `owner`, `owner_renounced`, `proxy` (type, admin, implementation, beacon, is_proxy), `flags` (array of risk strings like 'upgradeable_proxy', 'has_owner', 'admin_can_change_logic'), `token` (name, symbol, decimals, total_supply), `interfaces` (erc165/erc721/erc1155 booleans), `native_balance`, `code_size_bytes`, `summary` (human-readable one-liner), `safe` (null or safety verdict), `checked_at` (ISO timestamp), and `next` (array of suggested follow-up endpoint paths).

## 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": {
       "enum": [
        "base",
        "eth"
       ],
       "type": "string",
       "description": "base (default) or eth mainnet"
      },
      "address": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
       ],
       "description": "Address to inspect"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kind": "ERC20",
  "next": [
   "/crypto/token-risk?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "/crypto/allowance?owner=&spender="
  ],
  "safe": null,
  "chain": "base",
  "flags": [
   "upgradeable_proxy",
   "has_owner",
   "admin_can_change_logic"
  ],
  "owner": "0x...",
  "proxy": {
   "type": "ZEPPELINOS_LEGACY",
   "admin": "0x4fc7850364958d97b4d3f5a08f79db2493f8ca44",
   "beacon": null,
   "is_proxy": true,
   "implementation": "0x2ce6311ddae708829bc0784c967b7d77d19fd779"
  },
  "token": {
   "name": "USD Coin",
   "symbol": "USDC",
   "decimals": 6,
   "total_supply": 4100000000
  },
  "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "summary": "ERC20 USDC behind ZEPPELINOS_LEGACY proxy, has owner",
  "chain_id": 8453,
  "checked_at": "2026-10-30T03:40:00Z",
  "interfaces": {
   "erc165": false,
   "erc721": false,
   "erc1155": false
  },
  "is_contract": true,
  "native_balance": 0,
  "code_size_bytes": 1852,
  "owner_renounced": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-microdata-chain-code-inspector-x402-7f97c9cb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
