-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add checkpointer infra files * feat: add sepolia price pusher config * feat: add mainnet price pusher config
- Loading branch information
Showing
9 changed files
with
161 additions
and
19 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,29 @@ | ||
FROM python:3.12-slim AS base | ||
|
||
ENV PYTHONUNBUFFERED=1 \ | ||
PYTHONDONTWRITEBYTECODE=1 \ | ||
PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 \ | ||
POETRY_VERSION=1.8.3 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=true \ | ||
POETRY_NO_INTERACTION=1 | ||
|
||
ENV PATH="/root/.local/bin:${PATH}" | ||
|
||
FROM base as builder | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
gcc \ | ||
libgmp3-dev \ | ||
pipx | ||
|
||
RUN pipx install poetry | ||
COPY pragma-sdk/ /opt/pragma-sdk/ | ||
COPY pragma-utils/ /opt/pragma-utils/ | ||
COPY checkpointer/ /opt/checkpointer/ | ||
WORKDIR /opt/checkpointer | ||
RUN poetry env use 3.12 | ||
RUN poetry install | ||
ENTRYPOINT poetry run checkpointer -c config/config.yaml -n ${NETWORK} --oracle-address ${ORACLE_ADDRESS} --admin-address ${ADMIN_ADDRESS} --private-key ${PRIVATE_KEY} -t ${CHECK_INTERVAL} --rpc-url ${RPC_URL} |
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,30 @@ | ||
version: 0.2 | ||
phases: | ||
pre_build: | ||
commands: | ||
- echo Logging in to Amazon ECR... | ||
- aws --version | ||
- aws ecr get-login-password --region $ECR_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$ECR_REGION.amazonaws.com | ||
- REPOSITORY_URI=$AWS_ACCOUNT_ID.dkr.ecr.$ECR_REGION.amazonaws.com/$ECR_REPOSITORY_NAME | ||
- COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7) | ||
- IMAGE_TAG=${COMMIT_HASH:=latest} | ||
build: | ||
commands: | ||
- echo Build started on `date` | ||
- echo Building the Docker image... | ||
- ls -ltr | ||
- docker build -f infra/checkpointer/Dockerfile -t $REPOSITORY_URI:latest . | ||
- docker tag $REPOSITORY_URI:latest $REPOSITORY_URI:$IMAGE_TAG | ||
post_build: | ||
commands: | ||
- echo Build completed on `date` | ||
- echo Pushing the Docker images... | ||
- docker push $REPOSITORY_URI:latest | ||
- docker push $REPOSITORY_URI:$IMAGE_TAG | ||
- echo Writing image definitions file... | ||
- printf '[{"name":"%s","imageUri":"%s"}]' $ECS_CONTAINER_NAME $REPOSITORY_URI:$IMAGE_TAG > imagedefinitions.json | ||
artifacts: | ||
files: | ||
- imagedefinitions.json | ||
- infra/checkpointer/config.yml | ||
discard-paths: yes |
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 @@ | ||
path: "/" | ||
container_port: 8080 | ||
health_check_path: "/" | ||
container_environment: | ||
- region: "eu-west-3" | ||
- prefix: "/conf/{{ SERVICE_NAME }}/{{ RUN_ENV }}" | ||
- keys: | ||
- NETWORK | ||
- ORACLE_ADDRESS | ||
- ADMIN_ADDRESS | ||
- PRIVATE_KEY | ||
- CHECK_INTERVAL | ||
- RPC_URL |
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,9 @@ | ||
spot: | ||
- pair: BTC/USD | ||
- pair: ETH/USD | ||
|
||
future: | ||
- pair: BTC/USD | ||
expiry: 0 | ||
- pair: ETH/USD | ||
expiry: 0 |
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,26 @@ | ||
- pairs: | ||
spot: | ||
- BTC/USD | ||
- BTC/EUR | ||
- WBTC/USD | ||
- STETH/USD | ||
- ETH/USD | ||
- WSTETH/USD | ||
- STRK/USD | ||
- USDC/USD | ||
- USDT/USD | ||
- DAI/USD | ||
- LORDS/USD | ||
- ZEND/USD | ||
- NSTR/USD | ||
time_difference: 120 | ||
price_deviation: 0.0025 | ||
|
||
- pairs: | ||
future: | ||
- BTC/USD | ||
- ETH/USD | ||
- BTC/USDT | ||
- ETH/USDT | ||
time_difference: 600 | ||
price_deviation: 0.05 |
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,26 @@ | ||
- pairs: | ||
spot: | ||
- BTC/USD | ||
- BTC/EUR | ||
- WBTC/USD | ||
- STETH/USD | ||
- ETH/USD | ||
- WSTETH/USD | ||
- STRK/USD | ||
- USDC/USD | ||
- USDT/USD | ||
- DAI/USD | ||
- LORDS/USD | ||
- ZEND/USD | ||
- NSTR/USD | ||
time_difference: 120 | ||
price_deviation: 0.0025 | ||
|
||
- pairs: | ||
future: | ||
- BTC/USD | ||
- ETH/USD | ||
- BTC/USDT | ||
- ETH/USDT | ||
time_difference: 600 | ||
price_deviation: 0.05 |
This file was deleted.
Oops, something went wrong.
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