Skip to content

RelationLab/sample-subgraph

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-subgraph

sample-subgraph

usage

install OpenZeppelin in local project
npm install @openzeppelin/subgraphs
yarn
build and deploy subgraph

configs/sample.json describes a erc20-subgraph, it can be compiled by:

yarn compiler-erc20 
yarn build-erc20
yarn codegen-erc20
yarn create-erc20-local
yarn deploy-erc20-local

yarn CMD is defined in package.josn

for details refer docs/*

sample.json
{
  "output": "generated/sample.",
  "chain": "dev",
  "id": "erc20",
  "startBlock": "12000000",
  "datasources": [
    {
      "module": [
        "erc20"
      ]
    }
  ]
}
  • id: subgraph name
  • startBlock: subgraph original position
  • module: load "erc20""module" from src/datasources/erc20.yaml

About

Subgraph schema and templates to index the activity of OpenZeppelin Contracts.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 59.9%
  • Shell 27.3%
  • JavaScript 12.8%