Skip to content

LasticXYZ/subsquid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Squid Indexer for Coretime Chain

This project utilizes a template from the Squid starter code to index code on the Coretime Chain, providing a streamlined process for developers.

Table of Contents

Prerequisites

Ensure you have the following installed before starting:

  • Node.js version 16.x
  • Docker
  • npm (Note: yarn package manager is not supported)

Quick Start

To install dependencies and start the project, use the following command. This script utilizes sqd, so please ensure it's installed beforehand.

npm install
npm run build
./run.sh

After execution, a GraphiQL playground will be accessible at localhost:4350/graphql.

Development Workflow

Project Conventions

The Squid tools adhere to specific project structures for optimal performance:

  • JavaScript compilations should be placed in lib, and TypeScript sources in src. The lib directory should mirror the structure of src.
  • Export all TypeORM classes through src/model/index.ts (or the lib/model module).
  • Define the database schema within schema.graphql.
  • Store database migration files in db/migrations as plain JavaScript files.
  • Configuration variables are set in the .env file, which is used by squid-* executables.

For detailed information on project structure and conventions, refer to the Subsquid Documentation.

Generate types

Generate specVersions:

npx substrate-metadata-explorer --rpc wss://rococo-coretime-rpc.polkadot.io --out myMetadata.jsonl

Generated specVersions Kusama:

npx substrate-metadata-explorer --rpc wss://kusama-coretime-rpc.polkadot.io --out myMetadataKusama.jsonl

Generate typegen with:

npx squid-substrate-typegen typegen.json  
sqd typegen    

Generate from graphQl with:

sqd codegen

Available sqd shortcuts:

sqd down
sqd up 
sqd migration:generate
sqd migration:apply
sqd up
sqd process

Deploy command :

sqd deploy --org lastic .

About

Ability to connect to subsquid

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages