# Tollex Chain Contract Read

> Tollex Chain Contract Read is a paid API for AI agents from api.tollex.org, paid per call via x402, $0.0079/call, status unknown (last checked 2026-10-11).

Reads a view or pure function from an on-chain smart contract by calling it with specified arguments and returning the result.

## Facts

- Endpoint: POST https://api.tollex.org/tools/chain_contract_read?utm_source=zero.xyz
- Price: $0.0079/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tollex-chain-contract-read-783589d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TPPEe3njv0wpklSn3uGQ5

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 tollex-chain-contract-read-783589d0 -d '<json body>'
```

Example prompt: Can you read the balanceOf function on the USDC contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, passing my wallet address 0x1234567890abcdef1234567890abcdef12345678 as the argument?

## When to prefer this

Use this endpoint when you need to read state from a deployed smart contract on Base or Robinhood Chain without writing to the chain. It is ideal for querying ERC-20 balances, NFT ownership, DeFi protocol parameters, or any other view/pure function. Prefer this over general-purpose RPC calls when you want automatic policy-gated payment handling and a signed receipt for auditing.

## Known failure modes

- Invalid contract address format (must be 0x-prefixed 40 hex chars) returns a validation error
- Malformed function signature not matching the required pattern returns a schema rejection
- Contract does not exist at the given address or the function reverts on-chain
- Too many arguments provided (max 10) triggers input validation failure
- Network congestion or RPC unavailability causes a timeout
- Payment reconciliation failure if the x402 USDC payment cannot be confirmed

## How this service works

Tollex lets software agents buy APIs and tools under rules you set: it finds a capability that fits, checks your policy before anything is signed, pays with x402 in USDC on Base or USDG on Robinhood Chain, reconciles uncertain payments and returns a signed receipt.

## Output

Returns the decoded return value of the specified smart contract view or pure function, along with a signed receipt confirming the call was made and paid for via x402 in USDC on Base or USDG on Robinhood Chain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "args": {
   "type": "array",
   "maxItems": 10
  },
  "address": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  },
  "signature": {
   "type": "string",
   "pattern": "^function [A-Za-z0-9_]+\\(.*\\) (external |public )?(view|pure) returns \\(.*\\)$",
   "examples": [
    "function balanceOf(address) view returns (uint256)"
   ],
   "maxLength": 300
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tool": {
   "id": "chain_contract_read",
   "version": "1.0.0",
   "provider": "tollex.robinhood-chain"
  },
  "result": {
   "result": "1000000000"
  },
  "evidence": [],
  "untrustedOutput": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tollex-chain-contract-read-783589d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tollex.org](https://www.zero.xyz/host/api.tollex.org/llms.txt)
