Skip to content

paltalabs/subquery-sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subquery Sandbox Project

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.

Getting Started Locally

Running Docker Container

Execute the following script to enter a bash shell inside the Docker container running Node:

bash run.sh

Installing Docker Inside Container

After entering the bash shell, install Docker using the script:

bash install_docker.sh

Setting Up Subql

To set up Subql, run:

bash setup_subquery.sh

Initialize Project

Navigate to the subql-starter directory and follow these steps:

  1. Install dependencies:

    yarn
  2. Run Docker daemon:

    dockerd &
  3. Open another terminal and connect to Docker:

    bash connect.sh
  4. Change to subql-starter directory:

    cd subql-starter
  5. Build types:

    yarn codegen
  6. Build project:

    yarn build
  7. Initialize project:

    yarn start:docker

Publish to IPFS

To publish your project to IPFS, execute:

cd subql-starter
subql publish

Configuration Settings

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.

Notes

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.

Additional Information

Deployed IPFS address: QmdRo3aSaYuwdevWJa6Ltev3aKovwTHEyjYnkBqMXsAQbK

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published