# Checkpoint aggregator (v2)

Buffers qualifying Chain 138 payments and submits **one mainnet checkpoint per batch** (default **10** txs, partial flush after **5 min**).

## Env

| Variable | Default |
|----------|---------|
| `PRIVATE_KEY` | required |
| `CHAIN138_MAINNET_CHECKPOINT_PROXY` | required (UUPS proxy) |
| `CHAIN138_RPC_URL` | `http://192.168.11.211:8545` |
| `MAINNET_RPC_URL` | public mainnet RPC |
| `CHECKPOINT_BATCH_SIZE` | `10` |
| `CHECKPOINT_MAX_WAIT_MS` | `300000` |
| `CHECKPOINT_MIN_VALUE_WEI` | `0` |

## Run

```bash
cd smom-dbis-138/services/checkpoint-aggregator
pnpm install && pnpm build
CHAIN138_MAINNET_CHECKPOINT_PROXY=0x… pnpm start
```

Indexer REST (`GET /v1/checkpoint/latest`) is a separate deployable; see `docs/07-ccip/MAINNET_CHECKPOINT_MAXIMUM_ARCHITECTURE.md`.
