Skip to content

Latest commit

 

History

History
92 lines (65 loc) · 3.15 KB

README.md

File metadata and controls

92 lines (65 loc) · 3.15 KB
code snippets

Subgraphs

This repository contains the official source code for the Moxie subgraphs. Currently, there are 3 subgraphs:

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.

Table Of Contents

Pre-requisites

Local Setup

First, enter the folder of subgraph you would like to work with:

cd <SUBGRAPH_FOLDER>

then, install the dependencies:

npm i

Deployment

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>

Contributing

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.

License

GNU General Public License v3.0