Git Product home page Git Product logo

loot-box-subgraph's Introduction

PoolTogether LootBox Subgraph

The official PoolTogether LootBox subgraph.

Quick-use:

$ yarn clean && yarn prepare:local && graph codegen subgraph.local.yaml && graph build subgraph.local.yaml && yarn create:local && yarn deploy:local

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

  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.template.yaml subgraph.local.yaml
  1. Update the corresponding addresses in networks/local.json

  2. Allocate the subgraph in the local Graph node

$ yarn create-local
  1. Update the local subgraph
$ yarn deploy-local
Deploying to Rinkeby

Deploy to staging:

$ yarn prepare:rinkeby && yarn gen:rinkeby && yarn build:rinkeby && yarn deploy:rinkeby-stg

Tag a Release

To git tag a new release using the version in the package.json use the command:

$ yarn tag-release

loot-box-subgraph's People

Contributors

aodhgan avatar asselstine avatar chuckbergeron avatar

Stargazers

Thomas Erhel avatar Denham Preen avatar Michael Demarais avatar

Watchers

James Cloos avatar Michael Demarais avatar  avatar  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.