# Macaroon Network Chain State Snapshot

> Macaroon Network Chain State Snapshot is a paid API for AI agents from api.macaroonnetwork.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Fetches live current block number and gas price for Base and Polygon mainnet via real-time RPC calls

## Facts

- Endpoint: POST https://api.macaroonnetwork.com/execute/chain-state-snapshot-v1
- 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/macaroon-network-chain-state-snapshot-76c5d918
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QmrOyaZGxXAfC9l4xTy6M

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 macaroon-network-chain-state-snapshot-76c5d918 -d '<json body>'
```

Example prompt: What's the current block number and gas price on Base and Polygon mainnet right now? I need a live snapshot, not cached data.

## When to prefer this

Use this endpoint when you need guaranteed live, real-time blockchain state (block number and gas price) for Base or Polygon mainnet and cannot tolerate stale cached data. Prefer this over static database lookups or corpus-search endpoints when the freshness of the data matters — such as before submitting a transaction, estimating gas costs, or checking chain liveness. Not suitable for historical block data or chains other than Base or Polygon.

## Known failure modes

- RPC provider outage causes call to fail or return stale data
- Network timeout if upstream RPC endpoint is slow to respond
- Payment failure if x402 micropayment is not processed correctly
- Malformed request body causes 400-level error
- Rate limiting or upstream RPC throttling returns error

## How this service works

Current block number and gas price for Base and Polygon mainnet, fetched live via RPC on every call. Unlike this catalogue's corpus-search listings, this makes a real outbound network call on purchase -- freshness is the product, not a stored snapshot.

## Output

Returns the current block number and gas price for both Base and Polygon mainnet, fetched live via RPC at the time of the call — not a cached or indexed snapshot. Provides freshness-guaranteed chain state data useful for gas estimation, timing decisions, and chain monitoring.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/macaroon-network-chain-state-snapshot-76c5d918/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.macaroonnetwork.com](https://www.zero.xyz/host/api.macaroonnetwork.com/llms.txt)
