# OneSource Contract Introspection

> OneSource Contract Introspection is a paid API for AI agents from api.onesource.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Retrieves name, symbol, decimals, and ERC20/721/1155 interface support for a smart contract address via eth_call

## Facts

- Endpoint: GET https://api.onesource.io/api/chain/contract/:address
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onesource-contract-introspection-749d480b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OBKFiixeOYniVqXRNHYFC

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 onesource-contract-introspection-749d480b
```

Example prompt: What token standard and metadata does the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum support — is it ERC20, ERC721, or ERC1155, and what are its name, symbol, and decimals?

## When to prefer this

Use this endpoint when you need to quickly identify what type of token contract is deployed at an address and retrieve its basic metadata (name, symbol, decimals, interface flags) without setting up your own Ethereum node. Ideal for agents that need to classify a contract before deciding how to interact with it (e.g., distinguishing ERC20 transfers from ERC721 transfers). Prefer over raw RPC calls when you want a single unified response covering multiple interface checks.

## Known failure modes

- Invalid or malformed contract address (not matching 0x + 40 hex chars) returns a validation error
- Contract address that is an EOA (externally owned account) with no deployed bytecode may return empty or null fields
- Contract that does not implement standard name/symbol/decimals functions returns partial or empty metadata
- Unsupported network value (not ethereum or sepolia) returns an error
- Network RPC unavailability causes a timeout or 503 response

## How this service works

Best-effort contract introspection via batched RPC - bytecode presence, token metadata, and ERC20-like/ERC721/ERC1155 classification

## Output

Returns the contract's human-readable name, ticker symbol, decimal precision, and boolean flags indicating which token interfaces (ERC20, ERC721, ERC1155) the contract supports, all fetched via eth_call without requiring an archive node.

## Example request

```json
{
 "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
 "network": "ethereum"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onesource-contract-introspection-749d480b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.onesource.io](https://www.zero.xyz/host/api.onesource.io/llms.txt)
