The official PoolTogether LootBox subgraph.
$ yarn clean && yarn prepare:local && graph codegen subgraph.local.yaml && graph build subgraph.local.yaml && yarn create:local && yarn deploy:local
First you'll need to setup a graph node, then you can deploy the project to it.
- Clone the Graph Node repo:
$ git clone https://github.com/graphprotocol/graph-node/
- Enter the dir
$ cd graph-node/docker
- If using Linux, fix the local IP address:
$ ./setup.sh
- Spin up the node
$ docker-compose up
Make sure you've already deployed the LootBox contracts. If you haven't done so, check out https://github.com/pooltogether/loot-box. Once the contracts are deployed locally on ganache-cli (remember to use 0.0.0.0 as the IP address for the RPC endpoint), you can set up the subgraph:
- Install deps
$ yarn
- Ensure generated code is up-to-date:
$ yarn codegen
- Create a new local manifest called
subgraph.local.yaml
$ cp subgraph.template.yaml subgraph.local.yaml
-
Update the corresponding addresses in
networks/local.json
-
Allocate the subgraph in the local Graph node
$ yarn create-local
- Update the local subgraph
$ yarn deploy-local
Deploy to staging:
$ yarn prepare:rinkeby && yarn gen:rinkeby && yarn build:rinkeby && yarn deploy:rinkeby-stg
To git tag a new release using the version
in the package.json
use the command:
$ yarn tag-release