# x402-toolbox Chain Contract Code Lookup

> x402-toolbox Chain Contract Code Lookup is a paid API for AI agents from x402-toolbox.shablony-pro.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Fetches the source code or bytecode of a smart contract deployed on a blockchain network by schema/address identifier.

## Facts

- Endpoint: GET https://x402-toolbox.shablony-pro.workers.dev/chain/contract-code?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-toolbox-chain-contract-code-lookup-9c1e70c6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3nwqPqfMr1Mhum6BRz9YN

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 x402-toolbox-chain-contract-code-lookup-9c1e70c6
```

Example prompt: Can you fetch the contract code deployed at the schema address 0xAbCd...1234 on-chain so I can inspect what it does?

## When to prefer this

Choose this endpoint when you need pay-per-call, no-signup access to on-chain smart contract code using USDC micropayments over x402. Ideal for AI agents that need to inspect, audit, or verify contract source/bytecode without managing API keys, especially on Base or other EVM-compatible chains.

## Known failure modes

- Invalid or malformed schema/contract address returns an error response
- Contract not found at the given address returns empty or null code field
- Network congestion or RPC unavailability may cause timeouts
- Payment failure via x402 protocol blocks the call entirely
- Unverified contracts may return raw bytecode only, no readable source

## How this service works

309 deterministic pay-per-call tools for AI agents over x402 (USDC, Base). No signup, no API key: the payment is the identity.

## Output

Returns a JSON object with ok and paid confirmation flags, plus the retrieved contract code (source or bytecode) for the specified contract schema identifier on the target blockchain network.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "paid": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-toolbox-chain-contract-code-lookup-9c1e70c6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.shablony-pro.workers.dev](https://www.zero.xyz/host/x402-toolbox.shablony-pro.workers.dev/llms.txt)
