The official PoolTogether subgraph.
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 upMake sure you've already deployed the PoolTogether contracts. If you haven't done so, check out the mock project. Once the contracts are deployed, 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.yaml subgraph.local.yaml- Update
subgraph.local.yamlto the correct contract address (network doesn't matter)
// subgraph.local.yaml
dataSources:
- kind: ethereum/contract
name: PoolTogether
network: mainnet
source:
address: "<Your locally deployed address here>"
abi: Pool- Allocate the subgraph in the local Graph node
$ yarn create-local- Update the local subgraph
$ yarn deploy-local