Git Product home page Git Product logo

subgraph's Introduction

Interep subgraph

Interep subgraph definition (The Graph).

Linter eslint Code style prettier Repository top language


The Interep subgraph allows on-chain Merkle trees to be queried using GraphQL.

Kovan Goerli Arbitrum One
interep-groups-kovan interep-groups-goerli

Install

Clone this repository and install the dependencies:

$ git clone https://github.com/interep-project/subgraph.git
$ cd subgraph
$ yarn # or `npm i`

Usage

The subgraph definition consists of a few files:

  • subgraph.yaml: a YAML file containing the subgraph manifest,
  • schema.graphql: a GraphQL schema that defines what data is stored for the subgraph, and how to query it via GraphQL,
  • src/mappings.ts: AssemblyScript code that translates from the event data to the entities defined in the schema.

Lint

Lint the src AssemblyScript code:

yarn lint

Network

Prepare your network:

yarn prepare:kovan
# or
yarn prepare:goerli

Code generation

Generate AssemblyScript types for the subgraph (required every time the schema changes):

yarn codegen

Authorization

Set the authorisation code that links your account on thegraph.com:

yarn auth <access-token>

Deploy

Deploy the subgraph to the hosted service:

yarn deploy:kovan
// or
yarn deploy:goerli

subgraph's People

Contributors

cedoor avatar glamperd avatar jdhyun09 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

subgraph's Issues

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.