# base-contract

> base-contract is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.005/call, status unknown (last checked 2026-12-03).

Introspects a Base mainnet address to determine if it's a contract, its bytecode size, its best-effort owner, and whether it's a proxy contract.

## Facts

- Endpoint: POST https://x402.agentindex.world/base/contract?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-contract-7527dd1c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jUNh3ggAOF_6ePfjVuDx7

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 base-contract-7527dd1c -d '<json body>'
```

Example prompt: Is 0x4200000000000000000000000000000000000006 a smart contract on Base mainnet, and if so is it a proxy — also tell me the bytecode size and owner if you can find one.

## When to prefer this

Use this endpoint when you need a comprehensive single-call summary of a Base mainnet address's contract status, including proxy detection and ownership — rather than making separate calls for bytecode, owner, or proxy pattern checks. Prefer this over base-code when you also need ownership or proxy info in one round trip.

## Known failure modes

- Address is an EOA (not a contract) — returns is-contract: false with no bytecode or owner
- Contract does not expose an owner() function — owner field returns null or is omitted
- Proxy detection is best-effort and may produce false negatives for non-standard proxy patterns
- Invalid or malformed address input causes a 400-level error
- Network congestion on Base RPC may cause slow or failed responses

## How this service works

Contract introspection on Base mainnet - is it a contract, bytecode size, best-effort owner(), and whether it's a proxy.

## Output

Returns whether the address is a contract (boolean), the bytecode size in bytes, a best-effort owner address (from calling owner() on the contract, if available), and whether the contract appears to be a proxy (e.g. EIP-1967 or similar pattern).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "address": {
   "type": "string",
   "title": "Address"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-contract-7527dd1c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
