# Contract Introspection - Base & Ethereum

> Contract Introspection - Base & Ethereum is a paid API for AI agents from scanpay-edge.alextaghiashvili.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-01).

Returns bytecode size, EIP-1967 proxy implementation address, and ERC-20 token metadata (name, symbol, decimals) for a smart contract on Base or Ethereum.

## Facts

- Endpoint: GET https://scanpay-edge.alextaghiashvili.workers.dev/api/v1/contract-info?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/contract-introspection-base-ethereum-3039201b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dsXSiynMbR10aj3hpfb4Q

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 contract-introspection-base-ethereum-3039201b
```

Example prompt: Can you look up the contract info for 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base — I want to know the token name, symbol, decimals, bytecode size, and whether it's a proxy contract?

## When to prefer this

Use this endpoint when you need on-chain contract metadata for Base or Ethereum without running your own RPC node — particularly useful for confirming ERC-20 token identity before a swap, detecting proxy upgradeable patterns in DeFi protocols, or verifying that an address is a real contract before interacting with it. Prefer it over generic blockchain explorers when you need a structured JSON response that an AI agent can directly consume, and when you need both proxy detection and token metadata in a single call.

## Known failure modes

- Address is an EOA (externally owned account) — is_contract returns false, token fields may be null
- Contract does not implement ERC-20 — name/symbol/decimals return null
- Unsupported network specified — request fails or returns error
- Invalid or malformed contract address — returns an error response
- Network congestion or RPC timeout — call may fail or be slow
- Contract is a minimal proxy (EIP-1167) rather than EIP-1967 — implementation address may not be detected

## How this service works

Pay-per-call x402 APIs for AI agents: OpenAI-compatible LLM chat, perp funding and arbitrage spreads, crypto prices, gas, FX, Solana SPL mint audit, token price by contract, x402 delivery-receipt verification, web search, clean page extraction, batch tools and deterministic code-security scanning. USDC on Base or Solana, no signup, no API key, from $0.0001 a call.

## Output

Returns a JSON object containing the contract address, network, chain ID, ERC-20 name/symbol/decimals (if applicable), bytecode size in bytes, is_contract boolean, is_proxy boolean, EIP-1967 implementation address (or null if not a proxy), and the price paid per call in USD.

## 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": {
      "address": {
       "type": "string"
      },
      "network": {
       "enum": [
        "base",
        "ethereum"
       ],
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "USD Coin",
  "symbol": "USDC",
  "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "network": "base",
  "product": "scanpay.contract_info",
  "chain_id": "eip155:8453",
  "decimals": 6,
  "is_proxy": false,
  "price_usd": 0.003,
  "is_contract": true,
  "bytecode_size": 1852,
  "implementation": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/contract-introspection-base-ethereum-3039201b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scanpay-edge.alextaghiashvili.workers.dev](https://www.zero.xyz/host/scanpay-edge.alextaghiashvili.workers.dev/llms.txt)
