Interep subgraph definition (The Graph).
The Interep subgraph allows on-chain Merkle trees to be queried using GraphQL.
| Kovan | Goerli | Arbitrum One |
|---|---|---|
| interep-groups-kovan | interep-groups-goerli |
Clone this repository and install the dependencies:
$ git clone https://github.com/interep-project/subgraph.git
$ cd subgraph
$ yarn # or `npm i`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 the src AssemblyScript code:
yarn lintPrepare your network:
yarn prepare:kovan
# or
yarn prepare:goerliGenerate AssemblyScript types for the subgraph (required every time the schema changes):
yarn codegenSet the authorisation code that links your account on thegraph.com:
yarn auth <access-token>Deploy the subgraph to the hosted service:
yarn deploy:kovan
// or
yarn deploy:goerli