This repository contains the various subgraphs that Enzyme Finance uses:
- enzyme-asset-universe
- enzyme-core
- enzyme-diva-staking
- enzyme-vault-balances
- enzyme-vault-lineage
- enzyme-vault-shares
- mln-token
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 --studio
Once logged in, go to the subgraph directory (in /subgraphs/name-of-subgraph
) and run
pnpm upload <context>
All subgraphs are deployed on the Graph network:
- enzyme-asset-universe
- enzyme-core
- enzyme-diva-staking
- enzyme-vault-balances
- enzyme-vault-lineage
- enzyme-vault-shares
- mln-token