Subgraph for Odyssey Protocol
Run yarn install
To build a subgraph, a subgraph.yaml file is required. This file is created from a subgraph.template.yaml based on the network configuration found in the /config directory.
Below command will automatically generate the subgraph.yaml file and build the subgraph.
yarn build --network <networkName>For example:yarn build --network ethereum
Supported networks:
base,ethereum,optimism, andplasma.
Follow deployment guide here to understand the process of deployment.
Graph auth
- Get the graph deploy key, follow steps here.
- Run `yarn graph auth
Deploy Subgraph
yarn deploy --network <networkName>will build and deploy subgraph for given network.
Deploy command is going to ask subgraph name. As a rule of thumb you should follow "odyssey-subgraph-${networkName}" pattern for subgraph name.