Skip to main content

CLI cheatsheet

This guide provides a quick reference to the commands needed to launch the squid and manage the database.

Install dependencies

npm i

Compile the project

npx tsc

Launch Postgres database to store the data

docker compose up -d

Apply database migrations to create the target schema

npx squid-typeorm-migration apply

Run indexer

node -r dotenv/config lib/main.js

Check out the indexed swaps

docker exec "$(basename "$(pwd)")-db-1" psql -U postgres \
-c "SELECT id, logs_count, found_at FROM contract ORDER BY logs_count desc LIMIT 10"

Notice that this project doesn't utilize sqd commands.