remove default pubsubtopic and add new deploy script

This commit is contained in:
stubbsta 2024-05-28 09:18:58 +02:00
parent ed4ac08bf5
commit 800790f078
No known key found for this signature in database
3 changed files with 42 additions and 4 deletions

40
deploy_rlnv2_contract.sh Normal file
View File

@ -0,0 +1,40 @@
#!/bin/sh
set -e
# 2. Install pnpm
echo "installing pnpm..."
npm install -g -d pnpm
# curl -L -o /usr/local/bin/pnpm https://github.com/pnpm/pnpm/releases/download/v9.1.3/pnpm-linux-x64
# PNPM_HOME=/usr/local/bin/
# chmod +x /usr/local/bin/pnpm
# 1. Install foundry
echo "installing foundry..."
curl -L https://foundry.paradigm.xyz | bash && . /root/.bashrc && foundryup && export PATH=$PATH:$HOME/.foundry/bin
# 3. Clone and build waku-rln-contract repo
if [ -d "/waku-rln-contract" ]; then
echo "waku-rln-contract directory already exists."
else
git clone https://github.com/waku-org/waku-rlnv2-contract.git
fi
cd /waku-rlnv2-contract
echo "forge install..."
forge install
echo "pnpm install..."
pnpm install
echo "forge build..."
forge build
# 4. Create .env file with RPC_PROVIDER variable
echo "creating .env file with RPC_PROVIDER=$RPC_URL"
echo "RPC_PROVIDER=$RPC_URL" > .env
# 5. Deploy the contracts
forge script script/Deploy.s.sol --broadcast --fork-url $RPC_URL

View File

@ -39,9 +39,9 @@ services:
- RPC_URL=${RPC_URL:-http://foundry:8545}
entrypoint: sh
command:
- '/opt/deploy_rln_contract.sh'
- '/opt/deploy_rlnv2_contract.sh'
volumes:
- ./deploy_rln_contract.sh:/opt/deploy_rln_contract.sh
- ./deploy_rlnv2_contract.sh:/opt/deploy_rlnv2_contract.sh
depends_on:
- foundry
networks:

View File

@ -138,8 +138,6 @@ exec /usr/bin/wakunode\
--rest-admin=true\
--rest-private=true\
--rest-address=0.0.0.0\
--cluster-id=0\
--pubsub-topic=/waku/2/default-waku/proto\
--rest-port=8645\
--rln-relay=true\
--rln-relay-dynamic=true\