TheGraph exposes a GraphQL endpoint to query the events and entities within the Binance Smart Chain and TomYumSwap ecosystem.
Currently, there are multiple subgraphs, but additional subgraphs can be added to this repository, following the current architecture.
-
Blocks: Tracks all blocks on Binance Smart Chain.
-
Exchange: Tracks all TomYumSwap Exchange data with price, volume, liquidity, ...
-
Farm Auctions: Tracks all TomYumSwap Farm Auctions with auctions and bids.
-
Lottery: Tracks all TomYumSwap Lottery with rounds, draws and tickets.
-
NFT Market (v1): Tracks all TomYumSwap NFT Market for ERC-721.
-
Pairs: Tracks all TomYumSwap Pairs and Tokens.
-
Pancake Squad: Tracks all Pancake Squad metrics with Owners, Tokens (including metadata), and Transactions.
-
Prediction (v1): Tracks all TomYumSwap Prediction (v1) with market, rounds, and bets.
-
Prediction (v2): Tracks all TomYumSwap Prediction (v2) with market, rounds, and bets.
-
Profile: Tracks all TomYumSwap Profile with teams, users, points and campaigns.
-
SmartChef: Tracks all TomYumSwap SmartChef (a.k.a. Syrup Pools) with tokens and rewards.
-
Timelock: Tracks all TomYumSwap Timelock queued, executed, and cancelled transactions.
-
Trading Competition (v1): Tracks all metrics for the Easter Battle (April 07—14, 2021).
- Graph CLI
- Required to generate and build local GraphQL dependencies.
yarn global add @graphprotocol/graph-cli
For any of the subgraph: blocks
as [subgraph]
-
Run the
cd subgraphs/[subgraph]
command to move to the subgraph directory. -
Run the
yarn codegen
command to prepare the TypeScript sources for the GraphQL (generated/*). -
Run the
yarn build
command to build the subgraph, and check compilation errors before deploying. -
Run
graph auth --product hosted-service '<ACCESS_TOKEN>'
-
Deploy via
yarn deploy
.
To access subgraphs related to TomYumSwap v1 ecosystem (article), use v1
branch.