Archived
Add a sushiswap-subgraph stack (#496)
* Add a sushiswap-graph stack * Fix shared volume name in fixturenet-lotus * Export Lotus miner node multiaddr after initialization * Add deployment scripts for sushiswap contracts * Skip contracts deployment if already exists * Rename stack to sushiswap-subgraph * Fix postgres and use Lotus fixturenet in graph-node stack * Add sushiswap v3 subgraph stack * Fixes to deploy sushiswap subgraph to graph-node * Add graph-node container in sushiswap subgraph stack --------- Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
This commit was merged in pull request #496.
This commit is contained in:
@@ -2,9 +2,11 @@ version: "1.0"
|
||||
name: fixturenet-graph-node
|
||||
description: "A graph-node fixturenet"
|
||||
repos:
|
||||
- github.com/filecoin-project/lotus
|
||||
- github.com/graphprotocol/graph-node
|
||||
containers:
|
||||
- cerc/lotus
|
||||
- cerc/graph-node
|
||||
pods:
|
||||
- fixturenet-lotus
|
||||
- fixturenet-graph-node
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# SushiSwap Graph
|
||||
|
||||
## Setup
|
||||
|
||||
Clone required repositories:
|
||||
|
||||
```bash
|
||||
laconic-so --stack sushiswap-subgraph setup-repositories
|
||||
```
|
||||
|
||||
Build the container images:
|
||||
|
||||
```bash
|
||||
laconic-so --stack sushiswap-subgraph build-containers
|
||||
```
|
||||
|
||||
## Deploy
|
||||
|
||||
Deploy the stack:
|
||||
|
||||
```bash
|
||||
laconic-so --stack sushiswap-subgraph deploy --cluster sushigraph up
|
||||
```
|
||||
|
||||
After all services have started, wait and check that the subgraph has been deployed to graph-node
|
||||
|
||||
```bash
|
||||
laconic-so --stack sushiswap-subgraph deploy --cluster sushigraph logs -f sushiswap-subgraph-v3
|
||||
|
||||
# Expected end output
|
||||
# ...
|
||||
# sushigraph-sushiswap-subgraph-v3-1 | - Deploying to Graph node http://graph-node:8020/
|
||||
# sushigraph-sushiswap-subgraph-v3-1 | Deployed to http://graph-node:8000/subgraphs/name/sushiswap/v3-lotus/graphql
|
||||
# sushigraph-sushiswap-subgraph-v3-1 |
|
||||
# sushigraph-sushiswap-subgraph-v3-1 | Subgraph endpoints:
|
||||
# sushigraph-sushiswap-subgraph-v3-1 | Queries (HTTP): http://graph-node:8000/subgraphs/name/sushiswap/v3-lotus
|
||||
# sushigraph-sushiswap-subgraph-v3-1 |
|
||||
# sushigraph-sushiswap-subgraph-v3-1 | Done
|
||||
```
|
||||
|
||||
## Clean up
|
||||
|
||||
Stop all the services running in background run:
|
||||
|
||||
```bash
|
||||
laconic-so --stack sushiswap-subgraph deploy --cluster sushigraph down
|
||||
```
|
||||
|
||||
Clear volumes created by this stack:
|
||||
|
||||
```bash
|
||||
# List all relevant volumes
|
||||
docker volume ls -q --filter "name=sushigraph"
|
||||
|
||||
# Remove all the listed volumes
|
||||
docker volume rm $(docker volume ls -q --filter "name=sushigraph")
|
||||
|
||||
# WARNING: After removing volumes with Lotus params
|
||||
# They will be downloaded again on restart
|
||||
|
||||
# To remove volumes that do not contain Lotus params
|
||||
docker volume rm $(docker volume ls -q --filter "name=sushigraph" | grep -v "params$")
|
||||
```
|
||||
@@ -0,0 +1,28 @@
|
||||
version: "1.0"
|
||||
name: sushiswap-subgraph
|
||||
description: "An end-to-end SushiSwap Subgraph stack"
|
||||
repos:
|
||||
## fixturenet-lotus repo
|
||||
- github.com/filecoin-project/lotus
|
||||
## graph-node repo
|
||||
- github.com/graphprotocol/graph-node
|
||||
## sushiswap repos
|
||||
- github.com/cerc-io/sushiswap-v3-core@watcher-ts
|
||||
- github.com/cerc-io/sushiswap-v3-periphery@watcher-ts
|
||||
## subgraph repo
|
||||
- github.com/sushiswap/subgraphs
|
||||
containers:
|
||||
## fixturenet-lotus image
|
||||
- cerc/lotus
|
||||
## fixturenet-graph-node image
|
||||
- cerc/graph-node
|
||||
## sushiswap contract deployment images
|
||||
- cerc/sushiswap-v3-core
|
||||
- cerc/sushiswap-v3-periphery
|
||||
## sushiswap subgraphs image
|
||||
- cerc/sushiswap-subgraphs
|
||||
pods:
|
||||
- fixturenet-lotus
|
||||
- fixturenet-graph-node
|
||||
- contract-sushiswap
|
||||
- sushiswap-subgraph-v3
|
||||
Reference in New Issue
Block a user