# Riley Craig x402 Agent Store — Chain Block Number

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

Returns the current block number for a specified EVM-compatible blockchain network (Base, Ethereum, Optimism, Arbitrum, Polygon, or Gnosis)

## Facts

- Endpoint: GET https://x402-agent-store.rileycraig14.workers.dev/chain/block-number
- Price: $0.001/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-chain-block-number-9dbfb25f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jQASbHTDjDqmxbtinOo1a

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-chain-block-number-9dbfb25f
```

Example prompt: What's the current block number on Base right now? Pay per call, no API key needed.

## When to prefer this

Use this endpoint when you need a quick, no-signup, pay-per-call lookup of the current block height on any major EVM chain (Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis). Ideal for AI agents that need on-chain timing data, block confirmation checks, or chain liveness checks without managing API keys or subscriptions. Prefer this over free RPC endpoints when operating in an x402 micropayment context.

## Known failure modes

- Invalid chain name returns an error or defaults to base
- Network congestion may cause slight staleness in block number
- Payment failure via x402 returns a 402 Payment Required response
- Unsupported chain identifier returns a validation error

## 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 at $0.001.

## Output

A JSON object containing the chain name (e.g. 'base') and the current block number as an integer (e.g. {"chain":"base","block_number":47234186}). The block number reflects the latest confirmed block at time of request.

## 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"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "block_number": 47234186
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/riley-craig-x402-agent-store-chain-block-number-9dbfb25f/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)
