# Riley Craig x402 Agent Store — On-Chain Contract Call

> Riley Craig x402 Agent Store — On-Chain Contract Call is a paid API for AI agents from x402-agent-store.rileycraig14.workers.dev, paid per call via x402, $0.09/call, status unknown (last checked 2026-09-14).

Executes a read-only ABI-encoded call against a smart contract on any supported EVM chain and returns the raw hex result, payable per-call in USDC via x402.

## Facts

- Endpoint: GET https://x402-agent-store.rileycraig14.workers.dev/chain/call
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/riley-craig-x402-agent-store-on-chain-contract-call-9fb0410c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_W9maAuJwt_E4ckpkFhbV5

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 riley-craig-x402-agent-store-on-chain-contract-call-9fb0410c
```

Example prompt: Call the balanceOf function on the USDC contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum with my ABI-encoded calldata 0x70a082310000000000000000000000001234567890abcdef1234567890abcdef12345678 and return the raw result.

## When to prefer this

Choose this endpoint when an AI agent needs to read on-chain state from any EVM-compatible smart contract (Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis) without managing RPC infrastructure, API keys, or node providers. It is ideal for agents that already have ABI-encoded calldata ready and want a pay-per-call, keyless approach via x402 micropayments. Prefer this over self-hosted RPC calls when avoiding key management is a priority.

## Known failure modes

- Invalid or malformed contract address returns an error
- Malformed or invalid ABI-encoded calldata causes a revert or decode error
- Unsupported chain identifier returns a validation error
- Contract reverts the call (view function throws) returns an error result
- Insufficient USDC payment via x402 results in HTTP 402 payment required
- Network or RPC node unavailability causes a timeout or 5xx error

## How this service works

Simulate any read-only Ethereum contract call via eth_call — pass a contract address and encoded calldata, get the raw return value, across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. The universal contract-read primitive for agents that need a view function not covered by a dedicated endpoint. Live public RPC; one paid call at $0.001.

## Output

A JSON object containing the target contract address ('to'), the chain name ('chain'), and the raw ABI-encoded hex return value ('result') from the contract call, e.g. {"to":"0x...","chain":"base","result":"0x000...0020758c6"}.

## 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": [
      "to",
      "data"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "Contract address (0x...)"
      },
      "data": {
       "type": "string",
       "description": "ABI-encoded calldata (0x...)"
      },
      "chain": {
       "type": "string",
       "description": "base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "result": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "0x...",
  "chain": "base",
  "result": "0x000...0020758c6"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/riley-craig-x402-agent-store-on-chain-contract-call-9fb0410c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-store.rileycraig14.workers.dev](https://www.zero.xyz/host/x402-agent-store.rileycraig14.workers.dev/llms.txt)
