Indexes declarative DefiLlama retention adapters into PostgreSQL and serves read-only W4/W12 metrics over HTTP.
# Local
git submodule update --init --recursive
pnpm install
pnpm run adapters:install
cp .env.example .env
pnpm run db:up
# Production instead: fill .env before starting
cp .env.production.example .env
docker compose -f compose.production.yml up -d --build --waitSync or deliberately update the pinned adapter commit:
git submodule sync --recursive
git submodule update --init --recursive
git -C vendor/dimension-adapters fetch origin
git -C vendor/dimension-adapters checkout <reviewed-commit-sha>
git add vendor/dimension-adapters
git commit -m "update dimension adapters"pnpm run index -- all yesterday
pnpm run inspect
pnpm run serve
pnpm run smoke:postgres
pnpm run db:up
pnpm run db:downThe API only serves data. Install the writer timer to index daily at 10:15 UTC:
sudo install -m 0644 deploy/systemd/adapter-state-index.{service,timer} /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now adapter-state-index.timer
systemctl list-timers adapter-state-index.timer