This repo contains sample squid ETLs for indexing, transforming and presenting on-chain data of Substrate networks as GraphQL APIs. Each squid highlights a specific feature of the Subquid SDK.
- 1-events: Indexes
Balance.Transfer
events on Kusama. - 2-calls: Indexes calls to
Identity.set_identity
andIdentity.clear_indentity
. - 3-storage: Queries the historical network storage state to enrich event data.
- 4-constants: TBA
- 5-frontier: Indexes EVM logs emitted by a contract on Moonriver. The approach shown in this example is suitable for use cases requiring a mixture of Substrate and EVM data; consider using EVM processor instead if you only need EVM data.
- 6-remark: Indexes on-chain footnotes made by the
System.remark
extrinsic. - 8-custom-resolver: Indexes
Balance.Transfer
events and outputs total daily volumes via a custom GraphQL resolver.
- Node v16.x
- Docker
- Squid CLI
To install the Squid CLI, run
npm i -g @subsquid/cli
Navigate to the example folder.
npm ci
sqd build
# start the database
sqd up
# starts a long-running ETL and blocks the terminal
sqd process
# starts the GraphQL API server at localhost:4350/graphql
sqd serve