Prerequisites
- Node.js 20 or newer
- Git
- Docker with Compose
- An SQD Network API key
1
Install the Squid CLI
@subsquid/cli/<version>.2
Scaffold the current EVM template
evm alias is maintained by the CLI. It currently retrieves subsquid-labs/squid-evm-template.3
Configure access to the v2 gateway
Add your data API key to the existing
.env file:.env
EvmBatchProcessor reads this variable automatically when .setGateway() receives a URL. You can instead pass .setGateway({url, apiKey}), but do not commit a real key.The key is for SQD Network v2 gateway access. It is separate from the optional SQD Cloud deployment key used by
sqd auth.4
Build the project
build in commands.json. The command generates JavaScript in lib/ and stops on TypeScript errors.5
Start PostgreSQL
.env.6
Run the processor and GraphQL server
squid.yaml.
The processor command applies pending database migrations before it starts.The processor in src/processor.ts uses EvmBatchProcessor to request transactions sent to the zero address. The handler in src/main.ts turns each transaction into a Burn entity and inserts the batch through ctx.store.7
Query indexed data
Open Stop the CLI with
http://localhost:4350/graphql and run:Ctrl+C. Remove the local database container with:What to change next
- Edit
src/processor.tsto select the transactions, logs, traces, or state diffs your application needs. - Edit
schema.graphql, then runsqd codegenandsqd migration:generateafter model changes. - For Portal-native ingestion, use
@subsquid/evm-streamor migrate an existing processor with the Portal migration guide.