Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@sc1/subgraph

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sc1/subgraph

- open `packages/subgraph/lib/graph-node/docker/docker-compose.yml` - change line 20 `ethereum: 'mainnet:http://host.docker.internal:8545'` to `ethereum: 'avalanche:http://host.docker.internal:8545'` - change the image to `image: graphprotocol/graph-node:

latest
npmnpm
Version
0.31.0
Version published
Maintainers
1
Created
Source

To run subgraph local development on avalanche

  • open packages/subgraph/lib/graph-node/docker/docker-compose.yml
  • change line 20 ethereum: 'mainnet:http://host.docker.internal:8545' to ethereum: 'avalanche:http://host.docker.internal:8545'
  • change the image to image: graphprotocol/graph-node:c724404 to prevent errors from custom solidity errors.

run yarn fork avalanche --hostname 0.0.0.0

run yarn c:export to update contract.json file

cd packages/subgraph/lib/graph-node/docker and docker-compose up

if using fork:fresh avalanche, you'll need to copy & paste the address that SectorVaultFactory is deployed to into packages/subgraph/config/avalanche.js

if you're testing timelock you'll also want to update that address in the same file.

then set process.env.PUBLIC_SUBGRAPH = 'localhost'

cd packages/subgraph and yarn codegen:avalanche && yarn create-local && yarn deploy-local and press enter to skip version number

there will be an explorer at http://localhost:8000/subgraphs/name/sector-fi/sector-localhost/graphql

FAQs

Package last updated on 12 Jun 2023

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