Skip to content

Commit

Permalink
replace hardcoded MAX_MESSAGE_LIMIT in RLN contract (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
stubbsta authored Jun 20, 2024
1 parent f897701 commit 083318a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions deploy_rln_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,24 @@ 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..."
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
# Dummy values
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
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions wakusim.env
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 083318a

Please sign in to comment.