The official PoolTogether v3 subgraph.
$ yarn clean && yarn prepare:local && graph gen:local && yarn create:local && yarn deploy:local$ yarn clean && yarn prepare:kovan && yarn gen:kovan && yarn deploy:kovan$ yarn clean && yarn prepare:rinkeby && yarn gen:rinkeby && yarn deploy:rinkebyFirst 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
$ sudo docker-compose upMake sure you've already deployed the PoolTogether contracts. If you haven't done so, check out the contracts repo.
-
Change the
localhosttarget url to 0.0.0.0:8545 inbuilder.network.js -
Run
yarnto install the contract repo dependencies. -
Start a local ganache-cli instance using
ganache-cli -h 0.0.0.0 --chainId 31337. This facilates the local subgraph docker node to observe the local blockchain instance. -
In a different terminal window, run
yarn deploy localhostto compile and deploy the smart contracts to the local ganache-cli blockchain instance. -
In a different terminal window, run
yarn console localhostto interact with the contracts.
Once the contracts are deployed, you can now set up the subgraph:
- In this subgraph repo, install deps
$ yarn- Ensure generated code is up-to-date:
$ yarn codegen-
Update
networks/local.jsonto the correct contract addresses deployed locally -
Run
yarn clean && yarn prepare:local && graph gen:local && yarn create:local && yarn deploy:local