@voltz-protocol/v1-subgraph
v1.0.1
Published
A TypeScript graph interface for Voltz smart contract
Downloads
4
Keywords
Readme
Installation
- Run
yarn
- Start graph node:
docker-compose up
- Place ABIs in the
artifacts/
directory - In
voltz-core
, starthardhat
:npx hardhat node --hostname 0.0.0.0
- Create subgraph:
yarn create-local
- Deploy subgraph:
yarn deploy-local
Modifying code
After any change to the subgraph.yaml.template
, schema.graphql
, or any files in the src/
directory, run:
Either yarn configure:kovan
or configure:localhost
or configure:mainnet
, to populate the correct contract addresses
yarn codegen
Do not modify any files in the generated/
directory directly.
Deploy to hosted service
- Configure the hosted service using TheGraph's webapp, and save the appropriate access token in an
ACCESS_TOKEN
environment variable - Run
yarn configure:kovan
orconfigure:localhost
orconfigure:mainnet
, to populate the correct contract addresses yarn deploy
To reset docker
- Remove containers:
docker-compose down
- Remove
data/
directory containing database files - Run
docker-compose up
Contributing
If you wish to contribute to the Voltz subgraph codebase please install husky v7.0.2
or above to make sure your commits are checked for linting and that your commit messages are correctly formatted. Husky has been exluded from the devDependecies as it broke the npm install.