-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a sushiswap stack with contract deployments
- Loading branch information
1 parent
4227693
commit 4bce2fb
Showing
11 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3.2' | ||
|
||
services: | ||
# Deploys the core (UniswapV3Factory) contract | ||
sushiswap-v3-core: | ||
image: cerc/sushiswap-v3-core:local | ||
env_file: | ||
- ../config/watcher-sushiswap/contract-deployment.env | ||
|
||
# Deploys the periphery (NFPM, token, etc.) contracts | ||
sushiswap-v3-periphery: | ||
image: cerc/sushiswap-v3-periphery:local | ||
env_file: | ||
- ../config/watcher-sushiswap/contract-deployment.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ETH_RPC_ENDPOINT="http://lotus-node-1:1234/rpc/v1" | ||
CHAIN_ID=31415926 | ||
ACCOUNT_PRIVATE_KEY="0xc05fd3613bcd62a4f25e5eba1f464d0b76d74c3f771a7c2f13e26ad6439444b3" |
14 changes: 14 additions & 0 deletions
14
app/data/container-build/cerc-sushiswap-v3-core/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:18.15.0-alpine3.16 | ||
|
||
RUN apk --update --no-cache add git python3 alpine-sdk bash | ||
RUN curl -L https://unpkg.com/@pnpm/self-installer | node | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN echo "Installing dependencies..." && \ | ||
pnpm install | ||
|
||
# Keep container running for commands to be executed | ||
CMD ["tail", "-f"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Build cerc/sushiswap-v3-core | ||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
docker build -t cerc/sushiswap-v3-core:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/sushiswap-v3-core |
13 changes: 13 additions & 0 deletions
13
app/data/container-build/cerc-sushiswap-v3-periphery/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:18.15.0-alpine3.16 | ||
|
||
RUN apk --update --no-cache add git python3 alpine-sdk bash | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN echo "Installing dependencies..." && \ | ||
yarn install | ||
|
||
# Keep container running for commands to be executed | ||
CMD ["tail", "-f"] |
7 changes: 7 additions & 0 deletions
7
app/data/container-build/cerc-sushiswap-v3-periphery/build.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Build cerc/sushiswap-v3-periphery | ||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
docker build -t cerc/sushiswap-v3-periphery:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/sushiswap-v3-periphery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,5 @@ cerc/lotus | |
cerc/go-opera | ||
cerc/lasso | ||
cerc/reth | ||
cerc/sushiswap-v3-core | ||
cerc/sushiswap-v3-periphery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,4 @@ fixturenet-lotus | |
mainnet-go-opera | ||
lasso | ||
reth | ||
watcher-sushiswap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# SushiSwap | ||
|
||
## Setup | ||
|
||
Clone required repositories: | ||
|
||
```bash | ||
laconic-so --stack sushiswap setup-repositories | ||
|
||
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the conflicting repositories and re-run the command | ||
``` | ||
|
||
Build the container images: | ||
|
||
```bash | ||
laconic-so --stack sushiswap build-containers | ||
``` | ||
|
||
## Deploy | ||
|
||
Deploy the stack: | ||
|
||
```bash | ||
laconic-so --stack sushiswap deploy --cluster lotus up | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: "1.0" | ||
name: sushiswap | ||
description: "End-to-end SushiSwap watcher stack" | ||
repos: | ||
## fixturenet-lotus repo | ||
- github.com/filecoin-project/lotus | ||
## sushiswap repos | ||
- github.com/cerc-io/sushiswap-v3-core | ||
- github.com/cerc-io/sushiswap-v3-periphery | ||
containers: | ||
## fixturenet-lotus image | ||
- cerc/lotus | ||
## sushiswap images | ||
- cerc/sushiswap-v3-core | ||
- cerc/sushiswap-v3-periphery | ||
pods: | ||
- fixturenet-lotus | ||
- watcher-sushiswap |