# Riley Craig x402 Agent Store — Block Number

> Riley Craig x402 Agent Store — Block Number is a paid API for AI agents from store.agentexchange.work, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Returns the current block number for a specified EVM-compatible blockchain (Base, Ethereum, Optimism, Arbitrum, Polygon, or Gnosis), payable per call in USDC via x402.

## Facts

- Endpoint: GET https://store.agentexchange.work/chain/block-number
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/riley-craig-x402-agent-store-block-number-f16263b8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wlxJgU7c1qQOB9ALD_ViB

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-block-number-f16263b8
```

Example prompt: What's the current block number on Base right now?

## When to prefer this

Use this endpoint when an AI agent needs the current block number for an EVM-compatible chain without managing API keys, subscriptions, or RPC node infrastructure. Particularly useful in x402-enabled agent workflows where micro-payments per call are preferred over monthly billing. Supports 6 major EVM chains in a single unified API.

## Known failure modes

- Unsupported chain value returns an error — only base, ethereum, optimism, arbitrum, polygon, gnosis are valid
- Payment not included or insufficient USDC triggers HTTP 402 Payment Required
- Network or RPC connectivity issues may result in a 5xx error
- Default chain is Base if no chain query param is provided

## How this service works

The current chain tip (latest block height) via eth_blockNumber, across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. The freshness read settlement, indexing and trading agents poll to know where the chain is. Live public RPC; one paid call.

## Output

A JSON object containing the queried chain name (e.g. 'base') and the current block number as an integer (e.g. 47234186).

## 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",
     "properties": {
      "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": {
      "block_number": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/riley-craig-x402-agent-store-block-number-f16263b8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from store.agentexchange.work](https://www.zero.xyz/host/store.agentexchange.work/llms.txt)
