🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@voltz-protocol/v1-subgraph

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@voltz-protocol/v1-subgraph

A TypeScript graph interface for Voltz smart contract

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
12
Maintainers
1
Weekly downloads
 
Created
Source

Installation

  • Run yarn
  • Start graph node: docker-compose up
  • Place ABIs in the artifacts/ directory
  • In voltz-core, start hardhat: 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 or configure:localhost or configure: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.

FAQs

Package last updated on 19 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts