Skip to content
This repository was archived by the owner on Jun 11, 2021. It is now read-only.

pooltogether/pooltogether-subgraph

Repository files navigation

PoolTogether Subgraph

The official PoolTogether subgraph.

Local Setup

First you'll need to setup a graph node, then you can deploy the project to it.

Local Graph Node

  1. Clone the Graph Node repo:
$ git clone https://github.com/graphprotocol/graph-node/
  1. Enter the dir
$ cd graph-node/docker
  1. If using Linux, fix the local IP address:
$ ./setup.sh
  1. Spin up the node
$ docker-compose up

Deploying the Subgraph Locally

Make 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:

  1. Install deps
$ yarn
  1. Ensure generated code is up-to-date:
$ yarn codegen
  1. Create a new local manifest called subgraph.local.yaml
$ cp subgraph.yaml subgraph.local.yaml
  1. Update subgraph.local.yaml to 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
  1. Allocate the subgraph in the local Graph node
$ yarn create-local
  1. Update the local subgraph
$ yarn deploy-local

About

PoolTogether subgraph for the Graph Protocol

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •