# OneSource Ethereum Contract Introspection

> OneSource Ethereum 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-15).

Fetches on-chain contract metadata (name, symbol, decimals, ERC interface support) for a given Ethereum or Sepolia contract address

## Facts

- Endpoint: GET https://api.onesource.io/api/chain/contract/%7Baddress%7D
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onesource-ethereum-contract-introspection-7ff57c54
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xG7h3xeNe4ombbkOmkPbk

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-ethereum-contract-introspection-7ff57c54
```

Example prompt: What's the name, symbol, and decimals for the Ethereum contract at 0xdac17f958d2ee523a2206206994597c13d831ec7, and does it implement ERC20?

## When to prefer this

Use this endpoint when you need to identify what token or contract is deployed at a specific Ethereum address — especially to resolve ERC20 token metadata (name, symbol, decimals) or determine whether a contract is an NFT (ERC721/ERC1155). Prefer it over generic JSON-RPC eth_call when you want structured, pre-parsed contract introspection without writing ABI calls yourself. Works on both Ethereum mainnet and Sepolia testnet without API keys.

## Known failure modes

- Invalid address format (not a valid 0x-prefixed 40-char hex) returns a 400 error
- Address is an EOA (externally owned account), not a contract — returns empty or null metadata
- Contract does not implement standard name/symbol/decimals methods — partial or empty response
- Network unavailable or node sync issues — 503 or timeout
- Unsupported network value returns validation error

## How this service works

Three data families for AI agents: live Ethereum mainnet, Sepolia testnet, and Robinhood Chain RPC reads, plus Deepstate on-chain market data (order books, trades, candles, and analytics), plus The Standard Reserve (TSR), an on-chain reserve protocol on Robinhood Chain (supply, policy, epochs, auctions, branches, vaults, exit pressure). Pay per call or use batch/session mode: USDC on Base via x402, or pathUSD/USDC.e on Tempo via MPP. No API key required to start; a flat-rate monthly subscription is also available.

## Output

Returns a JSON object with the contract's name, symbol, address, decimals, and a list of detected ERC interfaces (e.g. ERC20, ERC721, ERC1155) as introspected from the live Ethereum or Sepolia chain.

## Example request

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

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "network": {
       "enum": [
        "ethereum",
        "sepolia",
        "robinhood"
       ],
       "type": "string",
       "default": "ethereum"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "symbol": {
         "type": "string"
        },
        "address": {
         "type": "string"
        },
        "decimals": {
         "type": "integer"
        },
        "is_erc20": {
         "type": "boolean"
        },
        "is_erc165": {
         "type": "boolean"
        },
        "is_erc721": {
         "type": "boolean"
        },
        "interfaces": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "is_erc1155": {
         "type": "boolean"
        },
        "code_length": {
         "type": "integer"
        },
        "is_contract": {
         "type": "boolean"
        }
       },
       "description": "Endpoint-specific response payload"
      },
      "meta": {
       "type": "object",
       "required": [
        "endpoint",
        "request_id"
       ],
       "properties": {
        "endpoint": {
         "type": "string"
        },
        "cost_usdc": {
         "type": "string"
        },
        "request_id": {
         "type": "string"
        },
        "payment_chain": {
         "type": "string"
        },
        "payment_token": {
         "type": "string"
        }
       }
      },
      "error": {
       "typ
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "name": "Tether USD",
   "symbol": "USDT",
   "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
   "decimals": 6,
   "is_erc20": true,
   "is_erc165": false,
   "is_erc721": false,
   "interfaces": [
    "ERC20"
   ],
   "is_erc1155": false,
   "code_length": 11075,
   "is_contract": true
  },
  "meta": {
   "endpoint": "/api/chain/contract/{address}",
   "cost_usdc": "0.001",
   "request_id": "00000000abcdef01",
   "payment_chain": "base",
   "payment_token": "USDC"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onesource-ethereum-contract-introspection-7ff57c54/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)
