Skip to content

tokamak-network/DRB-subgraph

Repository files navigation

Subgraph for $Commit-Reveal^2$ protocol

Quickstart

  1. Install
yarn

For Thanos Sepolia Network

  1. Update your subgraph.yaml
  • Update the address with your NftMarketplace Address
  • Update the startBlock with the block right before your contract was deployed
  1. Build graph locally
graph codegen && graph build
  • graph codegen: Generates code in the generated folder based on your schema.graphql
  • graph build: Generates the build that will be uploaded to the graph
  1. Deploy subgraph
make deploy NAME=<subgraph_name>

Delete the :8000 from the link printed to the console and use it.

For other networks

  1. Log into the graph UI and create a new Subgraph.

Use Ethereum Sepolia or Optimism Sepolia as the network.

  1. Initialize Subgraph
graph init --studio <subgraph_name>
  1. Authenticate CLI
graph auth  --studio YOUR_DEPLOY_KEY_HERE
  1. Update your subgraph.yaml
  • Update the address with your NftMarketplace Address
  • Update the startBlock with the block right before your contract was deployed
  1. Build graph locally
graph codegen && graph build
  • graph codegen: Generates code in the generated folder based on your schema.graphql
  • graph build: Generates the build that will be uploaded to the graph
  1. Deploy subgraph

Replace VERSION_NUMBER_HERE with a version number like 0.0.1.

graph deploy --studio <subgraph_name> -l VERSION_NUMBER_HERE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published