From 9ea3fea9d29274cb3c79cadc00a26b7fc8acdd4c Mon Sep 17 00:00:00 2001 From: Jonny Rhea <5555162+jrhea@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:06:02 -0500 Subject: [PATCH] update rate-bot (#91) --- images/rate-bot/Dockerfile | 4 ++-- images/rate-bot/rate_daddy.sh | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/images/rate-bot/Dockerfile b/images/rate-bot/Dockerfile index 9ad0da4..ba4cbc6 100644 --- a/images/rate-bot/Dockerfile +++ b/images/rate-bot/Dockerfile @@ -4,8 +4,8 @@ WORKDIR /src COPY ./rate_daddy.sh ./rate_daddy.sh COPY ./entry.sh ./entry.sh -ENV ETH_FROM=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 -ENV PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 +ENV ETH_FROM=0x6043bF4ec8834F918242BaCA0F1F3805F2a2988D +ENV PRIVATE_KEY=0f1616bb59774b929ba5256c2204123d9dedc4c142d013179b90f929997d119b ENV RPC_URL=http://ethereum:8545 ENV WAIT_TIME=1800 diff --git a/images/rate-bot/rate_daddy.sh b/images/rate-bot/rate_daddy.sh index cadd401..1873081 100755 --- a/images/rate-bot/rate_daddy.sh +++ b/images/rate-bot/rate_daddy.sh @@ -3,7 +3,6 @@ # Get the base token address from /artifact/addresses.json CONTRACT_ADDRESS=$(jq -r '.mockHyperdrive' /artifacts/addresses.json) -sleep 3 VAULT_ADDRESS=$(cast call ${CONTRACT_ADDRESS} "pool()(address)" --rpc-url ${RPC_URL}) NEW_RATE=$(echo "scale=16; 3+$(od -t u2 -An -N2 /dev/random)/(2 ^ 16)"| bc |sed 's/\.//g') cast send --from ${ETH_FROM} --private-key ${PRIVATE_KEY} $VAULT_ADDRESS "setRate(uint256)" $NEW_RATE --rpc-url ${RPC_URL}