- docker
- docker-compose
- graph cli
- A goerli RPC endpoint (on-premise works better)
git clone https://github.com/graphprotocol/graph-node.git
cd graph-node/docker && ls
...
ethereum: 'goerli:ETHEREUM_GOERLI_RPC_ENDPOINT'
...
docker-compose up
graph codegen subgraph.goerli_fast.yaml
graph create --node http://localhost:8020 vsuite-goerli
graph deploy vsuite-goerli --node http://localhost:8020 --ipfs http://localhost:5001 subgraph.goerli_fast.yaml
7. Visit the web UI
Test the following GraphQL request to ensure everything works well
{
nexuses {
factories {
address
pools {
address
}
}
}
}
After you create an account on chainstack, you can deploy this subgraph on their platform.
yarn global add @graphprotocol/graph-cli
yarn
graph codegen subgraph.testnet_fast.yaml # or subgraph.mainnet_fast.yaml
You'll need to create a new project on chainstack to contain the subgraph.
Then go into Subgraphs
> Add Subgraph
> Dedicated Subgraph
Select Ethereum and chose the network you want to deploy on. (Mainnet or Holesky)
Then Deploy Subgraph
Copy the Deployment command
and append the subgraph.mainnet_fast.yaml
or subgraph.testnet_fast.yaml
to the command according to the network you want to deploy on.
`graph deploy --node https://api.graph-ams.p2pify.com/.../deploy --ipfs https://api.graph-ams.p2pify.com/.../ipfs sgr-190-148-475 subgraph.mainnet_fast.yaml
`
Wait for the indexing to happen and test the following GraphQL request in the webUI (next to the indexing bar)
{
nexuses {
factories {
address
pools {
address
}
}
}
}