TheGraph exposes a GraphQL endpoint to query the events and entities within the Elastos Smart Chain and Glaze Finance ecosystem.
Currently, there are multiple subgraphs, but additional subgraphs can be added to this repository, following the current architecture.
-
[Blocks]: Tracks all blocks on the Elastos Smart Chain (ESC).
-
[Exchange]: Tracks all Glaze Exchange data with price, volume, liquidity, ...
-
[Glaze-Staking]: Tracks all manual and auto Glaze stake deposits and withdraws
-
[Pairs]: Tracks all Glaze Pairs and Tokens.
-
[SmartChef]: Tracks all Glaze SmartChef (a.k.a. Sugar Pools) with tokens and rewards.
-
[Timelock]): Tracks all Glaze Timelock queued, executed, and cancelled transactions.
- Graph CLI
- Required to generate and build local GraphQL dependencies.
yarn global add @graphprotocol/graph-cliFor any of the subgraph: blocks as [subgraph]
-
Run the
cd subgraphs/[subgraph]command to move to the subgraph directory. -
Run the
yarn codegencommand to prepare the TypeScript sources for the GraphQL (generated/*). -
Run the
yarn buildcommand to build the subgraph, and check compilation errors before deploying. -
Run
graph auth --product hosted-service '<ACCESS_TOKEN>' -
Deploy via
yarn deploy.