deploy_rln_contract script checks if the contract repo has already been cloned

This commit is contained in:
stubbsta 2024-04-29 09:27:39 +02:00
parent ec89d1dd78
commit 49182f8b61
No known key found for this signature in database

View File

@ -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