diff --git a/app/data/compose/docker-compose-watcher-sushiswap.yml b/app/data/compose/docker-compose-watcher-sushiswap.yml new file mode 100644 index 00000000..946ba6da --- /dev/null +++ b/app/data/compose/docker-compose-watcher-sushiswap.yml @@ -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 diff --git a/app/data/config/watcher-sushiswap/contract-deployment.env b/app/data/config/watcher-sushiswap/contract-deployment.env new file mode 100644 index 00000000..8cd749dc --- /dev/null +++ b/app/data/config/watcher-sushiswap/contract-deployment.env @@ -0,0 +1,3 @@ +ETH_RPC_ENDPOINT="http://lotus-node-1:1234/rpc/v1" +CHAIN_ID=31415926 +ACCOUNT_PRIVATE_KEY="0xc05fd3613bcd62a4f25e5eba1f464d0b76d74c3f771a7c2f13e26ad6439444b3" diff --git a/app/data/container-build/cerc-sushiswap-v3-core/Dockerfile b/app/data/container-build/cerc-sushiswap-v3-core/Dockerfile new file mode 100644 index 00000000..993897d4 --- /dev/null +++ b/app/data/container-build/cerc-sushiswap-v3-core/Dockerfile @@ -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"] diff --git a/app/data/container-build/cerc-sushiswap-v3-core/build.sh b/app/data/container-build/cerc-sushiswap-v3-core/build.sh new file mode 100755 index 00000000..74533781 --- /dev/null +++ b/app/data/container-build/cerc-sushiswap-v3-core/build.sh @@ -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 diff --git a/app/data/container-build/cerc-sushiswap-v3-periphery/Dockerfile b/app/data/container-build/cerc-sushiswap-v3-periphery/Dockerfile new file mode 100644 index 00000000..4fcf712c --- /dev/null +++ b/app/data/container-build/cerc-sushiswap-v3-periphery/Dockerfile @@ -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"] diff --git a/app/data/container-build/cerc-sushiswap-v3-periphery/build.sh b/app/data/container-build/cerc-sushiswap-v3-periphery/build.sh new file mode 100755 index 00000000..d7157025 --- /dev/null +++ b/app/data/container-build/cerc-sushiswap-v3-periphery/build.sh @@ -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 diff --git a/app/data/container-image-list.txt b/app/data/container-image-list.txt index 43781f8a..4f6534c8 100644 --- a/app/data/container-image-list.txt +++ b/app/data/container-image-list.txt @@ -44,3 +44,5 @@ cerc/lotus cerc/go-opera cerc/lasso cerc/reth +cerc/sushiswap-v3-core +cerc/sushiswap-v3-periphery diff --git a/app/data/pod-list.txt b/app/data/pod-list.txt index 97a7f369..5355c90e 100644 --- a/app/data/pod-list.txt +++ b/app/data/pod-list.txt @@ -30,3 +30,4 @@ fixturenet-lotus mainnet-go-opera lasso reth +watcher-sushiswap diff --git a/app/data/repository-list.txt b/app/data/repository-list.txt index e2cd263b..a3509035 100644 --- a/app/data/repository-list.txt +++ b/app/data/repository-list.txt @@ -39,3 +39,5 @@ github.com/cerc-io/lasso github.com/paradigmxyz/reth git.vdb.to/cerc-io/plugeth git.vdb.to/cerc-io/plugeth-statediff +github.com/cerc-io/sushiswap-v3-core +github.com/cerc-io/sushiswap-v3-periphery diff --git a/app/data/stacks/sushiswap/README.md b/app/data/stacks/sushiswap/README.md new file mode 100644 index 00000000..42cde33d --- /dev/null +++ b/app/data/stacks/sushiswap/README.md @@ -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 +``` diff --git a/app/data/stacks/sushiswap/stack.yml b/app/data/stacks/sushiswap/stack.yml new file mode 100644 index 00000000..b4506cbf --- /dev/null +++ b/app/data/stacks/sushiswap/stack.yml @@ -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