Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.93 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.93 KB

Subsquid Logo

Algebra Migration Squid

Algebra Migration is an implementation of the Algebra Subgraph using the Squid SDK, migrating the Algebra subgraph to the squid SDK. It provides a powerful and flexible way to interact with on-chain data and query information from both EVM and WASM blockchains.

Prerequisites

Before getting started, ensure you have the following dependencies installed on your machine:

  • Node.js: JavaScript runtime for running JavaScript applications.
  • Docker: Used to manage containers for PostgreSQL.

Quickstart

Follow these steps to set up and run Algebra migration on your local machine:

# 0. Install @subsquid/cli globally (the sqd command)
npm i -g @subsquid/cli

# 1. Clone the repository
git clone https://github.com/RicqCodes/Algebra_Subgraph_MIgration

# 2. Navigate to the project folder
cd Algebra_Subgraph_MIgration

# 3. Rename .env.example to .env and configure environment variables

# 4. Install project dependencies
npm i

# 5. Build the project
sqd build

# 6. Start a PostgreSQL database container and detach
sqd up

# 7. Run migrations
sqd migration:generate
sqd migration:run

# 8. Start the processor
sqd process

# 9. The processor command will block the terminal while fetching chain data,
#    transforming it, and storing it in the target database.
#    To start the GraphQL server, open a separate terminal and run
sqd serve

A GraphiQL playground will be available at localhost:4350/graphql.

Query Examples