Skip to content

hai-on-op/subgraph

This branch is 53 commits ahead of, 11 commits behind reflexer-labs/geb-subgraph:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

95fbb96 · Apr 21, 2025
May 27, 2021
Apr 5, 2025
Apr 5, 2025
Jan 18, 2024
Apr 20, 2025
Oct 9, 2020
Nov 23, 2020
Oct 9, 2020
Aug 12, 2020
Aug 13, 2020
Aug 26, 2020
Oct 31, 2023
May 24, 2024
Nov 15, 2021
May 24, 2024
Feb 5, 2024
Oct 10, 2020
Apr 5, 2025
Apr 5, 2025
Aug 10, 2020
Feb 2, 2021
Feb 20, 2024

Repository files navigation

GEB subgraph

A Graph protocol subgraph for GEB

git clone https://github.com/reflexer-labs/geb-subgraph
cd geb-subgraph
git submodule update --init --recursive

Deploy on the hosted service

First, set the addresses of the smart contracts you want to index in config/kovan.json or config/mainnet.json.

Then, open a terminal and run:

npm install -D

# To run once with the token from the dashboard
npm run auth <GRAPH AUTH TOKEN>

# For kovan testnet
npm run deploy-hosted-kovan
# For mainnet
npm run deploy-hosted-mainnet

Local development

First, start a blockchain node on localhost:8545 (Ganache, Parity POA, etc..) configure the smart contract addresses in config/test.json.

Configure the docker/.env to:

POSTGRES_PASSWORD=1234

# For MacOS
ETHEREUM_RPC=http://host.docker.internal:8545/

#For Linux
ETHEREUM_RPC=http://172.17.0.1:8545/

NETWORK=test

Run:

cd docker
docker-compose up -d

Then access the GraphQL endpoints using:

http://localhost/subgraphs/name/reflexer-labs/rai (HTTP queries)

Production Graph node deployment

Run a graph node on a live chain (Ethereum Mainnet, Kovan etc..), deploy to subgraph on the node, expose the graphQL endpoint. Frist, configure the smart contract addresses in config/kovan.json or config/mainnet.json.

Configure the docker/.env to:

# Set an actual password
POSTGRES_PASSWORD=1234

# Ethereum node RPC endpoint (i.g: infura)
ETHEREUM_RPC=https://kovan.infura.io/v3/<API_KEY>/

# Set to mainnet or kovan
NETWORK=kovan

# Name of the subgraph on the graph node.
SUBGAPH_NAME=reflexer-labs/rai

Then run the following commands:

cd graph-node
docker-compose up -d

These will start the Graph node, an IPFS node, a Postgress DB and then it will deploy the subgraph on the Graph node.

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.4%
  • Shell 3.3%
  • JavaScript 1.1%
  • Dockerfile 0.2%