This mono-repository contains all subgraphs (using The Graph) available in the LooksRare ecosystem.
| Name | Description | Status | Can run tests? |
|---|---|---|---|
| Exchange | Subgraph with trade events on the LooksRareExchange |
Deployed (Hosted Network + The Graph network) | ✅ |
| LOOKS Distribution | Subgraph with events related to the LOOKS token distribution across multiple contracts | Deployed (Hosted Network) | ✅ |
| Royalty fee registry | Subgraph tracking collection royalty events from the RoyaltyFeeRegistry contract |
Deployed (Hosted Network) | ✅ |
| Airdrop | Subgraph to calculate LOOKS airdrop based on WyvernExchange adjusted volumes |
Deprecated | ❌ |
| EIP721 | Generic subgraph to track ERC-721 tokens | Informational | ❌ |
| EIP1155 | Generic subgraph to track ERC-1155 tokens | Informational | ❌ |
The documentation for deployed subgraphs is available here.
For any of the subgraphs (referred to as [subgraph] on the mainnet network):
- 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 build:mainnetcommand to build the subgraph, and check compilation errors before deploying. - Run
graph auth --product hosted-service '<ACCESS_TOKEN>'(for Hosted Service) orgraph auth --studio <DEPLOY KEY>'(for The Graph network). - Deploy via
yarn deploy:mainnet.
Unit tests are written using the Matchstick framework from LimeChain.
The Matchstick framework requires Postgres installed, read more here.
For any of the subgraph supporting tests (referred to 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 build:mainnetcommand to build the subgraph, and check compilation errors. - Run the
yarn testcommand to execute the tests.