Contract: https://github.com/compolabs/orderbook-contract/tree/master/market-contract
Please refer to the documentation website for a thorough guide on all Squid indexer features
-
Clone the repository
git clone [email protected]:compolabs/spark-subsquid-indexer.git
-
Open it locally
cd spark-subsquid-indexer
-
First, install the latest version of Subsquid CLI as a global npm package
npm i -g @subsquid/cli@latest
-
Install dependencies
npm i
-
Generate TypeORM entities from the schema file
sqd codegen
-
Generate data access classes for an ABI file(s) in the ./abi folder
sqd typegen
-
Compile the project
sqd build
-
Launch Postgres database to store the data
sqd up
-
Apply database migrations to create the target schema
sqd migration:generate
-
Run indexer
sqd process
- In another terminal, launch the server (open http://localhost:4000/graphql)
sqd serve
- Shut down the database
sqd down