From c118e37dc2eb72f0b164a480810456ab5878666b Mon Sep 17 00:00:00 2001 From: stubbsta Date: Tue, 3 Dec 2024 13:14:00 +0200 Subject: [PATCH] Verify git commit checkout and use known default commit --- deploy_rln_contract.sh | 8 ++++++++ docker-compose.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/deploy_rln_contract.sh b/deploy_rln_contract.sh index 9b560e2..ba6344f 100644 --- a/deploy_rln_contract.sh +++ b/deploy_rln_contract.sh @@ -15,6 +15,14 @@ fi cd /waku-rlnv2-contract git checkout $RLN_CONTRACT_REPO_COMMIT +# Verify the current commit +CURRENT_COMMIT=$(git rev-parse HEAD) +if [ "$CURRENT_COMMIT" = "$RLN_CONTRACT_REPO_COMMIT" ]; then + echo "You are on the expected branch: $CURRENT_COMMIT" +else + echo "Warning: You are on branch $CURRENT_COMMIT, but expected $RLN_CONTRACT_REPO_COMMIT" + exit 1 +fi #3. Replace the hardcoded MAX_MESSAGE_LIMIT sed -i "s/\b100\b/${MAX_MESSAGE_LIMIT}/g" script/Deploy.s.sol diff --git a/docker-compose.yml b/docker-compose.yml index c8cea03..6592794 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,7 +38,7 @@ services: labels: com.centurylinklabs.watchtower.enable: '${WATCHTOWER_ENABLED:-false}' environment: - - RLN_CONTRACT_REPO_COMMIT=${RLN_CONTRACT_REPO_COMMIT:-master} + - RLN_CONTRACT_REPO_COMMIT=${RLN_CONTRACT_REPO_COMMIT:-64df4593c6a14e43b8b0e9b396d2f4772bb08b34} - PRIVATE_KEY=${PRIVATE_KEY} - RPC_URL=${RPC_URL:-http://foundry:8545} - ETH_FROM=${ETH_FROM}