This repo contains the indexer for Velodrome V2 and Aerodrome across multiple chains. The indexer is written in TypeScript using the Envio indexing platform.
config.yaml
- Defines contracts to index and events to track across multiple chainsschema.graphql
- Defines the entity structure for the databasesrc/EventHandlers/*.ts
- Contains the business logic for processing blockchain eventssrc/cache.ts
- Implements caching for blockchain data to reduce RPC calls.env
- Contains configuration variables (copy from.env.example
and customize)
Constants.ts
- Contains chain-specific constants and configurationsErc20.ts
- Helpers for working with ERC20 tokensPriceOracle.ts
- Functions for fetching and managing token pricesStore.ts
- Functions for managing pool address mappings
Make sure you have pnpm installed (version 9.x+ recommended).
pnpm install
Envio provides a simple development workflow:
# Generate code based on your schema and config
pnpm envio codegen
# Start the indexer (eg. inside the existing running container) ...
pnpm envio start
# Or, automatically sets up docker containers and starts indexing
pnpm dev
To stop the indexer:
pnpm envio stop
# Runs any linters/formatters, use pnpm qa --write to apply changes
pnpm qa
# Runs tests
pnpm test
For comprehensive documentation on the Envio indexing platform, please refer to: