Skip to content

Commit

Permalink
update rate-bot (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhea authored Oct 17, 2023
1 parent 4a06c06 commit 9ea3fea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions images/rate-bot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion images/rate-bot/rate_daddy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 9ea3fea

Please sign in to comment.