# Contract Check

> Contract Check is a paid API for AI agents from x402-echo-service.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Determines whether a Base blockchain address is a smart contract or an externally owned account (EOA), returning bytecode size and keccak-256 hash.

## Facts

- Endpoint: POST https://x402-echo-service.onrender.com/chain/code
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/contract-check-78146a95
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XM6h8F-ApaiBBsKbiXog_

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-check-78146a95 -d '<json body>'
```

Example prompt: Before I send funds, can you check if 0x1234567890abcdef1234567890abcdef12345678 on Base is a smart contract or just a regular wallet?

## When to prefer this

Use this endpoint when you need to quickly classify a Base address as a contract or EOA before sending funds, interacting programmatically, or auditing an address. Prefer this over a general block explorer lookup when you need machine-readable output (isContract boolean, bytecode size, code hash) for automated decision-making in an agent workflow.

## Known failure modes

- Invalid or malformed Ethereum address returns an error response
- Address with no on-chain activity may return isContract: false with size 0
- Network connectivity issues with the Base RPC may cause timeouts
- Self-destructed contracts may return isContract: false even if formerly deployed

## How this service works

Determine whether an address on Base is a contract or an externally owned account. POST {"address":"0x..."} and receive isContract, the bytecode size in bytes and its keccak-256 hash. Useful before sending funds to an unfamiliar address.

## Output

Returns a JSON object with: isContract (boolean indicating whether the address has deployed code), bytecodeSize (integer, size of the code in bytes — 0 for EOAs), and a keccak-256 hash of the bytecode for contract fingerprinting.

## Request schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/contract-check-78146a95/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-echo-service.onrender.com](https://www.zero.xyz/host/x402-echo-service.onrender.com/llms.txt)
