This repository contains the official source code for the Moxie subgraphs. Currently, there are 3 subgraphs:
- Protocol Stats Subgraph
- Protocol Minimal Subgraph
- Auction Stats Subgraph
- Auction Minimal Subgraph
- Vesting Subgraph
Keep in mind that the Graph Studio APIs are rate-limited, thus if you need higher limit, it's best that you deploy to your own Graph Indexer Node.
First, enter the folder of subgraph you would like to work with:
cd <SUBGRAPH_FOLDER>
then, install the dependencies:
npm i
First, enter the folder of subgraph you would like to deploy:
cd <SUBGRAPH_FOLDER>
Once you are in one of the subgraph folder, run the preparation script:
# `npm run prepare:base-sepolia` for indexing Base Sepolia Testnet
npm run prepare:base
Then, create a subgraph on your Graph Indexer Node:
graph create --node <GRAPH_NODE_URL> <SUBGRAPH_NAME>
Once the subgraph is created, generate an AssemblyScript types for the smart contract ABIs and the subgraph schema and compiles the subgraph to WebAssembly:
graph codegen && graph build
Once the process is executed successfully, simply run the following command to deploy to your Graph Indexer Node:
graph deploy --node <GRAPH_NODE_URL> <SUBGRAPH_NAME>
If you'd like to contribute to the Moxie subgraph repository or fix a bug please make sure to take a look at CONTRIBUTING.md.
GNU General Public License v3.0