# Base Onchain Tools – Contract Type Classifier

> Base Onchain Tools – Contract Type Classifier is a paid API for AI agents from base-onchain-tools.dolerite.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Returns the contract standard (ERC-20, ERC-721, etc.) and proxy pattern for a given Base mainnet contract address.

## Facts

- Endpoint: GET https://base-onchain-tools.dolerite.workers.dev/v1/base/contract-type?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-onchain-tools-contract-type-classifier-d4a15d52
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ivDu_nK9u1raqP-YsjP7x

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-onchain-tools-contract-type-classifier-d4a15d52
```

Example prompt: What type of contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base mainnet — is it an ERC-20, ERC-721, or something else, and does it use a proxy?

## When to prefer this

Choose this endpoint when you need fast, pay-per-call classification of a Base mainnet contract's standard and proxy pattern without setting up an API account or managing rate limits. It is ideal for agents that encounter arbitrary contract addresses and need to understand what interface they expose before calling them. Prefer this over manually inspecting ABIs or calling raw RPC when you want a structured, human-readable classification with zero-setup billing via x402.

## Known failure modes

- Address not a contract (EOA) — returns error or 'unknown' kind
- Invalid or malformed address format — 4xx, not billed
- Upstream RPC outage across all five providers — 5xx, not billed
- Contract bytecode is too minimal to classify — may return 'unknown'
- Incomplete batch data treated as failure rather than partial result — not billed

## How this service works

Eleven read-only endpoints answering questions about Base mainnet that are tedious to assemble from raw RPC: what an unverified contract is actually able to do, whether a token transfer will revert and for what reason, what an arbitrary token is worth, and whether an address is safe to pay. Priced $0.001-$0.04 per call in USDC over x402. No account, no API key, no signup, no minimum, no rate limit to negotiate — the payTo address in the 402 response is the whole integration. Failed calls are not billed. The payment middleware cancels settlement on any 4xx or 5xx, so a malformed parameter or an upstream outage costs nothing. Answers are read live from Base mainnet at request time, with failover across five independent RPC providers. A batch that comes back incomplete is treated as a failure rather than returned with the missing entries as zeros, because a confident wrong answer costs a caller more than an error does. Scope is deliberately narrow: Base mainnet only, reads only, no keys held, nothing stored between requests.

## Output

A JSON object with a 'kind' field indicating the contract standard (e.g. 'erc20', 'erc721', 'erc1155', 'unknown'), an 'is_proxy' boolean, and a 'proxy_type' string describing the proxy pattern (e.g. 'zeppelinos-legacy', 'eip1967') when applicable. Data is read live from Base mainnet at request time with failover across five RPC providers.

## 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",
       "description": "Contract address on Base mainnet"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kind": "erc20",
  "is_proxy": true,
  "proxy_type": "zeppelinos-legacy"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-onchain-tools-contract-type-classifier-d4a15d52/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-onchain-tools.dolerite.workers.dev](https://www.zero.xyz/host/base-onchain-tools.dolerite.workers.dev/llms.txt)
