subgraphs icon indicating copy to clipboard operation
subgraphs copied to clipboard

The official subgraphs of the Enzyme protocol.

Enzyme Subgraphs

Introduction

This repository contains the various subgraphs that Enzyme Finance uses:

  • asset-universe
  • diva-staking
  • enzyme-core
  • mln-token
  • vault-balances
  • vault-lineage
  • vault-shares

Installation

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

Subgraph Contexts

Each subgraph can be used in different contexts, i.e. for different deployements and chains.

Default contexts are:

  • ethereum
  • polygon

Run code generators for a subgraph

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>

Build a subgraph

Code generation does not check your mapping code. If you want to check the mapping code before uploading it, run

pnpm build <context>

Deploy a subgraph

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>

Deployed subgraphs

All subgraphs are deployed on the hosted network:

Some subgraphs are also deployed on the decentralized network: