Giter Site home page Giter Site logo

mstable / mstable-subgraph Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 7.0 432 KB

DEPRECATED - ๐Ÿ“Š A subgraph for mStable on The Graph

Home Page: https://thegraph.com/explorer/subgraph/mstable/mstable-protocol

License: MIT License

TypeScript 94.66% JavaScript 5.34%
ethereum stablecoins defi graphql

mstable-subgraph's Introduction

DEPRECATED

This repo has been deprecated in favour of the mStable subgraphs monorepo


mStable Subgraph

A subgraph for mStable contracts on The Graph.


Setup

Prerequisites

First, ensure these are installed:

Next, ensure the Docker daemon is running.

After that, clone the Graph Node project locally, and navigate to the docker directory in that project (e.g. cd graph-node/docker).

If you're on Linux, run ./setup.sh in that directory to set the host IP address in the docker config.

At this point, it should be possible to run the node: docker-compose up. Check that its services are running in the logs (GraphQL, Postgres, and IPFS).

Finally, run Ganache on http://0.0.0.0:7545 such that it is available to running Docker images (ganache-cli -p 7545 -h 0.0.0.0)

Installation

  1. yarn
  2. yarn prepare:<config> (i.e ropsten, kovan, local, staging, mainnet)
  3. yarn codegen

Development

Firstly, the subgraph can be created by running: yarn create:local; this should lead to a number of logs on the graph node.

Once the subgraph has been created, it can be deployed at any time with: yarn deploy:local.

This will cause the graph to start processing blocks and mapping events. Eventually, the subgraph will have been (re)created.

If changes are made to the contracts, subgraph.yaml, or the GraphQL schema, run yarn codegen; this re-create the generated folder.

NB: Type-checking is performed at build time; yarn tsc won't work.


Deployment

  1. yarn
  2. Ensure correct config in /config/<config>.json
  3. yarn prepare:<config>
  4. yarn codegen
  5. yarn deploy:<config> <access token>

mstable-subgraph's People

Contributors

alsco77 avatar jameslefrere avatar lovrobiljeskovic avatar shapeshed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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