chore: gardener housekeeping 2026-04-05
AGENTS.md watermarks refreshed to HEAD (62ba6f2).
Content updates:
- root AGENTS.md: added Docker/LXD notes (apparmor=unconfined, umami port 3001),
viem v2 slot0 array pattern to Key Patterns
- services/ponder/AGENTS.md: documented LM_ADDRESS, POOL_ADDRESS, and
MINIMUM_BLOCKS_FOR_RINGBUFFER env vars; added zero-stats troubleshooting note
- web-app/AGENTS.md: added viem v2 slot0 array compat section
Grooming: no open issues.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
62ba6f24fd
commit
47a02cab92
10 changed files with 27 additions and 31 deletions
|
|
@ -1,4 +1,4 @@
|
|||
<!-- last-reviewed: 79a93d41608f2cbe3b990f4613d04d310642bd2c -->
|
||||
<!-- last-reviewed: 62ba6f24fd0cf770dd8c3738563cb0bdeb48d6ea -->
|
||||
# Ponder Indexer - Agent Guide
|
||||
|
||||
Ponder-based indexer that records Kraiken protocol activity and exposes the GraphQL API consumed by the app and automation bot.
|
||||
|
|
@ -13,8 +13,15 @@ Ponder-based indexer that records Kraiken protocol activity and exposes the Grap
|
|||
- `ponder.config.ts` - Network selection and contract bindings (update addresses after deployments).
|
||||
- `ponder.schema.ts` - Stats, hourly data, and position tables.
|
||||
- `src/kraiken.ts` / `src/stake.ts` - Event handlers; rely on Ponder v0.13 helpers for on-chain reads during sync.
|
||||
- `src/helpers/stats.ts` - Ring buffer logic; `MINIMUM_BLOCKS_FOR_RINGBUFFER` is configurable via env var (see below).
|
||||
- `.ponder/` - Local SQLite/state cache (safe to delete when schemas change).
|
||||
|
||||
## Environment Variables
|
||||
- `LM_ADDRESS` — LiquidityManager contract address; must be set in `.env.local` for correct contract binding. Bootstrap (`containers/bootstrap.sh`) writes this automatically.
|
||||
- `POOL_ADDRESS` — Uniswap V3 pool address; discovered from the Uniswap factory during bootstrap and written to `.env.local`. Ponder uses this for pool event indexing.
|
||||
- `MINIMUM_BLOCKS_FOR_RINGBUFFER` — Override the minimum block count before ring buffer data is populated (default: 100). Set to `0` for local dev so early events populate the ring buffer from genesis.
|
||||
- `START_BLOCK` — Deploy block number; written by bootstrap; used as the Ponder `startBlock` for all contract event sources.
|
||||
|
||||
## Development Workflow
|
||||
- Primary path: `nohup ./scripts/dev.sh start &` boots Anvil, deploys contracts, and launches Ponder in watch mode.
|
||||
- Docker stack: `docker-compose up -d` starts all services including PostgreSQL; bootstrap creates `.env.local` automatically.
|
||||
|
|
@ -25,6 +32,7 @@ Ponder-based indexer that records Kraiken protocol activity and exposes the Grap
|
|||
- Confirm handler timestamps are monotonic; large gaps (>168 hours) reset the ring buffer by design.
|
||||
- Regenerate typings after schema edits by restarting Ponder; generated artifacts live in `generated/`.
|
||||
- If the stack script fails during boot, check `.ponder/logs` and RPC quota usage before rerunning.
|
||||
- If protocol activity statistics show all zeros, verify `LM_ADDRESS` and `POOL_ADDRESS` are present in `.env.local` — the indexer silently watches the wrong (zero) address if they are missing.
|
||||
|
||||
## Containerized Environment (Podman/Docker)
|
||||
- **Environment Loading**: `.env.local` must be explicitly sourced in the entrypoint script before `npm run dev`. Ponder's built-in env loader may not find it in containerized environments.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue