This repository is designed to set up a Subquery project for Stellar and Soroban networks. SubQuery is an open-source data indexer offering fast, flexible, and reliable custom APIs for web3 projects across various supported chains.
This project includes code for running and configuring a Subquery project to store data from specific contracts. Additionally, it incorporates Docker-based scripts to eliminate dependency on the host machine's configurations such as Node or Docker versions, and also avoids the need for a global Subql installation.
The following code has been successfully published to IPFS and we've been able to load it onto the SubQuery Managed Services. However, we are experiencing some challenges with the deployment on SubQuery Managed Services. We're actively looking and collaborating with the SubQuery team into resolving these issues to ensure smooth deployment.
Execute the following script to enter a bash shell inside the Docker container running Node:
bash run.sh
After entering the bash shell, install Docker using the script:
bash install_docker.sh
To set up Subql, run:
bash setup_subquery.sh
Navigate to the subql-starter
directory and follow these steps:
-
Install dependencies:
yarn
-
Run Docker daemon:
dockerd &
-
Open another terminal and connect to Docker:
bash connect.sh
-
Change to
subql-starter
directory:cd subql-starter
-
Build types:
yarn codegen
-
Build project:
yarn build
-
Initialize project:
yarn start:docker
To publish your project to IPFS, execute:
cd subql-starter
subql publish
Configuration changes are generally made in the subql-starter/project.ts
file.
-
Endpoints: Can be modified under the
network
key. -
Contracts & Data Sources: Can be modified under the
dataSources
key.
If you execute bash run.sh
, the container will start from scratch, requiring you to reinstall Docker. To avoid this, you can use:
bash start.sh
This will restart the container with previously installed Node and Docker configurations.
Deployed IPFS address: QmdRo3aSaYuwdevWJa6Ltev3aKovwTHEyjYnkBqMXsAQbK