replace hardcoded MAX_MESSAGE_LIMIT in RLN contract (#74)

This commit is contained in:
Tanya S 2024-06-20 15:39:19 +02:00 committed by GitHub
parent f89770124a
commit 083318a2bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View File

@ -15,7 +15,10 @@ fi
cd /waku-rlnv2-contract
# 3. Compile
#3. Replace the hardcoded MAX_MESSAGE_LIMIT
sed -i "s/\b20\b/${MAX_MESSAGE_LIMIT}/g" script/Deploy.s.sol
# 4. Compile
echo "forge install..."
forge install
echo "pnpm install..."
@ -23,7 +26,7 @@ pnpm install
echo "forge build..."
forge build
# 4. Export environment variables
# 5. Export environment variables
export RCL_URL=$RCL_URL
export PRIVATE_KEY=$PRIVATE_KEY
export ETH_FROM=$ETH_FROM
@ -31,5 +34,5 @@ export ETH_FROM=$ETH_FROM
export API_KEY_ETHERSCAN=123
export API_KEY_CARDONA=123
# 5. Deploy the contract
# 6. Deploy the contract
forge script script/Deploy.s.sol:Deploy --rpc-url $RPC_URL --broadcast -vv --private-key $PRIVATE_KEY --sender $ETH_FROM

View File

@ -39,6 +39,7 @@ services:
- PRIVATE_KEY=${PRIVATE_KEY}
- RPC_URL=${RPC_URL:-http://foundry:8545}
- ETH_FROM=${ETH_FROM}
- MAX_MESSAGE_LIMIT=${MAX_MESSAGE_LIMIT:-20}
entrypoint: sh
command:
- '/opt/deploy_rln_contract.sh'

View File

@ -13,6 +13,7 @@ RPC_URL=http://foundry:8545
# Contract-deployment
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
ETH_FROM=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
MAX_MESSAGE_LIMIT=30
# RLNv2 limits
RLN_RELAY_MSG_LIMIT=10
RLN_RELAY_EPOCH_SEC=60