Skip to main content
Version: Old ArrowSquid docs

Multichain balance tracking squid

This complex squid illustrates the usage of SubstrateBatchProcessor, storage calls and custom resolvers.


The squid uses Makefile for local commands, a solution that is currently deprecated in favor of sqd commands. Please keep that in mind.


Clone the repo and enter its directory:

git clone
cd balances-squid

There, create a .env file with the following contents:


Prepare the squid and start a processor by running

npm ci
make build
make up
make migrate
CHAIN=<chain_name> node -r dotenv/config ./lib/processor.js

Supported values for <chain_name>: hydradx, kusama, polkadot, acala, karura, moonriver, moonbeam, bifrost, phala.

Processor will block the terminal. Open another one in the same folder and run

make serve

there to get a GraphQL server running at localhost:4350/graphql.

Public endpoints

Browse GraphiQL playgrounds of this squid's public endpoints at the following URLs: