Code Monkey home page Code Monkey logo

pooltogether-subgraph-v3's Introduction

PoolTogether Brand


PoolTogether v3 Subgraph

The official PoolTogether v3 subgraph.

Quick-use:

$ yarn clean && yarn prepare:local && graph gen:local && yarn create:local && yarn deploy:local
For Kovan:
$ yarn clean && yarn prepare:kovan && yarn gen:kovan && yarn deploy:kovan
For Rinkeby:
$ yarn clean && yarn prepare:rinkeby && yarn gen:rinkeby && yarn deploy:rinkeby

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
$ sudo docker-compose up
Deploying the PoolTogether Contracts Locally

Make sure you've already deployed the PoolTogether contracts. If you haven't done so, check out the contracts repo.

  1. Change the localhost target url to 0.0.0.0:8545 in builder.network.js

  2. Run yarn to install the contract repo dependencies.

  3. 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.

  4. In a different terminal window, run yarn deploy localhost to compile and deploy the smart contracts to the local ganache-cli blockchain instance.

  5. In a different terminal window, run yarn console localhost to interact with the contracts.

Deploying the Subgraph Locally

Once the contracts are deployed, you can now set up the subgraph:

  1. In this subgraph repo, install deps
$ yarn
  1. Ensure generated code is up-to-date:
$ yarn codegen
  1. Update networks/local.json to the correct contract addresses deployed locally

  2. Run yarn clean && yarn prepare:local && graph gen:local && yarn create:local && yarn deploy:local

pooltogether-subgraph-v3's People

Contributors

chuckbergeron avatar robsecord avatar aodhgan avatar asselstine avatar

Stargazers

Rydamez Ochoa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.