@astraldao/astral-protocol-subgraph

0.0.46 • Public • Published

astral-protocol-subgraph

Running the subgraph locally

For more information see the docs on https://thegraph.com/docs/

Prerequisites

  • Run sudo apt-get install libsecret-1-dev
  • Docker Instalation
  • Run git clone https://github.com/graphprotocol/graph-node/ (check setup instructions for docker version)

Deployment

  1. Run a blockchain, e.g. ganache, in a separate terminal with the script in package.json (root folder): yarn ganache
  2. Deploy contracts from astral-protocol-contractswith yarn truffle in the root folder. Update addresses in the subgraph configuration if needed
  3. In a third terminal, on the graph-node folder, run cd docker && docker-compose up. If using Docker for WSL, Docker must be running on Windows. If graph-node throws an error try clearing the data/postgres folder, within the docker directory of graph-node, with sudo rm -rf data/postgres. Restart docker if needed (WSL)
  4. Generate subgraph typescript files with yarn codegen, then create and deploy the subgraph to the graph-node with yarn create-local && yarn deploy-local

Readme

Keywords

none

Package Sidebar

Install

npm i @astraldao/astral-protocol-subgraph

Weekly Downloads

0

Version

0.0.46

License

ISC

Unpacked Size

61.8 kB

Total Files

12

Last publish

Collaborators

  • astralprotocol