From 49182f8b619250fede58d451033760d27bca8663 Mon Sep 17 00:00:00 2001 From: stubbsta Date: Mon, 29 Apr 2024 09:27:39 +0200 Subject: [PATCH] deploy_rln_contract script checks if the contract repo has already been cloned --- deploy_rln_contract.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/deploy_rln_contract.sh b/deploy_rln_contract.sh index dd2b2ae..850443e 100644 --- a/deploy_rln_contract.sh +++ b/deploy_rln_contract.sh @@ -6,15 +6,25 @@ set -e curl -L https://foundry.paradigm.xyz | bash && . /root/.bashrc && foundryup && export PATH=$PATH:$HOME/.foundry/bin #. 2. Clone and build waku-rln-contract repo -git clone https://github.com/waku-org/waku-rln-contract.git +if [ -d "/waku-rln-contract" ]; then + echo "waku-rln-contract directory already exists." +else + git clone https://github.com/waku-org/waku-rln-contract.git +fi + cd /waku-rln-contract git checkout rln-v2 -forge install && yarn install && yarn compile +echo "forge install..." +forge install +echo "yarn install..." +yarn install +echo "yarn compile..." +yarn compile # 3. Create .env file with RPC_PROVIDER variable echo "creating .env file with RPC_PROVIDER=$RPC_URL" echo "RPC_PROVIDER=$RPC_URL" > .env -# 3. Deploy the contracts +# 4. Deploy the contracts yarn deploy localhost_integration \ No newline at end of file