This repository contains the various subgraphs that Enzyme Finance uses:
Before you can use the Enzyme subgraphs, make sure you have the latest versions of Node.js, pnpm installed.
Install project dependencies from the main directory:
pnpm install
Each subgraph can be used in different contexts, i.e. for different deployements and chains.
Default contexts are:
- ethereum
- polygon
In order to generate a subgraph.yaml
file and AssemblyScript classes for a specific subgraph, go to the subgraph directory (in /subgraphs/name-of-subgraph
) and run
pnpm codegen <context>
Code generation does not check your mapping code. If you want to check the mapping code before uploading it, run
pnpm build <context>
To deploy a subgraph to the default location, you need to be logged into the Graph CLI:
pnpm graph auth
Once logged in, go to the subgraph directory (in /subgraphs/name-of-subgraph
) and run
pnpm upload <context>
All subgraphs are deployed on the hosted network:
Some subgraphs are also deployed on the decentralized network: