Official subgraph(s) for opyn v2.
npm i
# compile types
npm run codegen
# build subgraph
npm run build
You will need an access token for deployment. After you get that on the graph, you need to run the following command before deploying.
graph auth https://api.thegraph.com/deploy/ <ACCESS_TOKEN>
Make sure you include the last /
at the end of the url!
npm run deploy:mainnet
npm run deploy:kovan
To deploy this subgraph on a different network,
you will first need to deploy the gamma protocol contracts on the desired network, and udpate the contract addresses in config/{network}.json
Then run
# create a subgraph.yaml file
mustache config/<network>.json subgraph.template.yaml > subgraph.yaml
# deploy
graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ <subgraph-name>
Change antoncoding/gamma-subgraph-new
in package.json
to your subgraph id.