-
Specify the contract address of the locally deployed Smart Contract, the emitted Events and their handlers in
subgraph.template.yamlfile. -
npm run codegenwhenever there are changes inschema.graphqlfile or the Contract abi(abis/*.json) -
npm run prepare:localto createsubgraph.yamlfile. -
Start a graph-node instance with
docker-compose up -
npm run create-localto create an instance of the graph (run only first time. Subsequent Deployments are done on the same graph node instance) -
npm run deploy-localto deploy event handler mappings to the graph node.
sign up on the graph with a github account create a graph project
-
npm install -g @graphprotocol/graph-cli -
graph auth --product hosted-service <ACCESS_TOKEN>
npm run codegen
set contract address and startblock in .json
set repository address (/) in subgraph.template.yaml and package.json
npm run deploy