mirror of
https://github.com/logos-messaging/logos-messaging-nim-compose.git
synced 2026-01-03 14:33:12 +00:00
Update RLN contract Address and token address
This commit is contained in:
parent
8e4a33b0a0
commit
ab4aff4649
@ -3,7 +3,7 @@
|
||||
RLN_RELAY_ETH_CLIENT_ADDRESS=https://linea-sepolia.infura.io/v3/<key>
|
||||
|
||||
# Address of the RLN contract on Linea Sepolia.
|
||||
RLN_CONTRACT_ADDRESS=0xB9cd878C90E49F797B4431fBF4fb333108CB90e6
|
||||
RLN_CONTRACT_ADDRESS=0x313a4a4dcf95da8e020b5375c0f8f732b7b4f15b
|
||||
|
||||
|
||||
# Advanced. Can be left empty in normal use cases.
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
ETH_TESTNET_ACCOUNT=<YOUR_TESTNET_ACCOUNT_ADDRESS_HERE>
|
||||
|
||||
# Address of the RLN Membership Token contract on Linea Sepolia used to pay for membership.
|
||||
TOKEN_CONTRACT_ADDRESS=0x185A0015aC462a0aECb81beCc0497b649a64B9ea
|
||||
TOKEN_CONTRACT_ADDRESS=0xd17e184e3c1941585a3edcb3a10367da6326d844
|
||||
|
||||
# Private key of testnet where you have Linea Sepolia ETH that would be staked into RLN contract.
|
||||
# Note: make sure you don't use the '0x' prefix.
|
||||
|
||||
@ -3,7 +3,7 @@ version: "3.7"
|
||||
x-rln-relay-eth-client-address: &rln_relay_eth_client_address ${RLN_RELAY_ETH_CLIENT_ADDRESS:-} # Add your RLN_RELAY_ETH_CLIENT_ADDRESS after the "-"
|
||||
|
||||
x-rln-environment: &rln_env
|
||||
RLN_RELAY_CONTRACT_ADDRESS: ${RLN_RELAY_CONTRACT_ADDRESS:-0xB9cd878C90E49F797B4431fBF4fb333108CB90e6}
|
||||
RLN_RELAY_CONTRACT_ADDRESS: ${RLN_RELAY_CONTRACT_ADDRESS:-0x313a4a4dcf95da8e020b5375c0f8f732b7b4f15b}
|
||||
RLN_RELAY_CRED_PATH: ${RLN_RELAY_CRED_PATH:-} # Optional: Add your RLN_RELAY_CRED_PATH after the "-"
|
||||
RLN_RELAY_CRED_PASSWORD: ${RLN_RELAY_CRED_PASSWORD:-} # Optional: Add your RLN_RELAY_CRED_PASSWORD after the "-"
|
||||
|
||||
|
||||
@ -18,58 +18,58 @@ if test -n "${ETH_CLIENT_ADDRESS}"; then
|
||||
fi
|
||||
|
||||
# Ensure Foundry (cast & foundryup) is available for token mint/approve calls
|
||||
if ! command -v cast >/dev/null 2>&1; then
|
||||
echo "Foundry toolkit (cast) not found. Installing Foundry..."
|
||||
curl -L https://foundry.paradigm.xyz | bash
|
||||
# Make the freshly installed binaries available in the current session
|
||||
export PATH="$HOME/.foundry/bin:$PATH"
|
||||
foundryup
|
||||
fi
|
||||
# if ! command -v cast >/dev/null 2>&1; then
|
||||
# echo "Foundry toolkit (cast) not found. Installing Foundry..."
|
||||
# curl -L https://foundry.paradigm.xyz | bash
|
||||
# # Make the freshly installed binaries available in the current session
|
||||
# export PATH="$HOME/.foundry/bin:$PATH"
|
||||
# foundryup
|
||||
# fi
|
||||
|
||||
# default: do mint/approve
|
||||
NEED_MINTING=1
|
||||
# # default: do mint/approve
|
||||
# NEED_MINTING=1
|
||||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--no-mint) NEED_MINTING=0 ;;
|
||||
--mint) NEED_MINTING=1 ;;
|
||||
esac
|
||||
done
|
||||
# for arg in "$@"; do
|
||||
# case "$arg" in
|
||||
# --no-mint) NEED_MINTING=0 ;;
|
||||
# --mint) NEED_MINTING=1 ;;
|
||||
# esac
|
||||
# done
|
||||
|
||||
RLN_CONTRACT_ADDRESS=0xB9cd878C90E49F797B4431fBF4fb333108CB90e6
|
||||
TOKEN_CONTRACT_ADDRESS=0x185A0015aC462a0aECb81beCc0497b649a64B9ea
|
||||
RLN_CONTRACT_ADDRESS=0x313a4a4dcf95da8e020b5375c0f8f732b7b4f15b
|
||||
TOKEN_CONTRACT_ADDRESS=0xd17e184e3c1941585a3edcb3a10367da6326d844
|
||||
TTT_AMOUNT_WEI=5000000000000000000
|
||||
|
||||
# Mint
|
||||
if [ "$NEED_MINTING" = "1" ]; then
|
||||
echo "\nMinting test token"
|
||||
if ! cast send "$TOKEN_CONTRACT_ADDRESS" "mint(address,uint256)" \
|
||||
"$ETH_TESTNET_ACCOUNT" "$TTT_AMOUNT_WEI" \
|
||||
--private-key "$ETH_TESTNET_KEY" \
|
||||
--rpc-url "$RLN_RELAY_ETH_CLIENT_ADDRESS"
|
||||
then
|
||||
echo " Mint transaction failed."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# if [ "$NEED_MINTING" = "1" ]; then
|
||||
# echo "\nMinting test token"
|
||||
# if ! cast send "$TOKEN_CONTRACT_ADDRESS" "mint(address,uint256)" \
|
||||
# "$ETH_TESTNET_ACCOUNT" "$TTT_AMOUNT_WEI" \
|
||||
# --private-key "$ETH_TESTNET_KEY" \
|
||||
# --rpc-url "$RLN_RELAY_ETH_CLIENT_ADDRESS"
|
||||
# then
|
||||
# echo " Mint transaction failed."
|
||||
# exit 1
|
||||
# fi
|
||||
# fi
|
||||
|
||||
# Approve
|
||||
echo "\nApprove to spend the test tokens"
|
||||
if ! cast send "$TOKEN_CONTRACT_ADDRESS" "approve(address,uint256)" \
|
||||
"$RLN_CONTRACT_ADDRESS" "$TTT_AMOUNT_WEI" \
|
||||
--private-key "$ETH_TESTNET_KEY" \
|
||||
--rpc-url "$RLN_RELAY_ETH_CLIENT_ADDRESS"
|
||||
then
|
||||
echo "Approve transaction failed."
|
||||
exit 1
|
||||
fi
|
||||
# # Approve
|
||||
# echo "\nApprove to spend the test tokens"
|
||||
# if ! cast send "$TOKEN_CONTRACT_ADDRESS" "approve(address,uint256)" \
|
||||
# "$RLN_CONTRACT_ADDRESS" "$TTT_AMOUNT_WEI" \
|
||||
# --private-key "$ETH_TESTNET_KEY" \
|
||||
# --rpc-url "$RLN_RELAY_ETH_CLIENT_ADDRESS"
|
||||
# then
|
||||
# echo "Approve transaction failed."
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
docker run -v "$(pwd)/keystore":/keystore/:Z wakuorg/nwaku:v0.36.0 generateRlnKeystore \
|
||||
--rln-relay-eth-client-address=${RLN_RELAY_ETH_CLIENT_ADDRESS} \
|
||||
--rln-relay-eth-private-key=${ETH_TESTNET_KEY} \
|
||||
--rln-relay-eth-contract-address=0xB9cd878C90E49F797B4431fBF4fb333108CB90e6 \
|
||||
--rln-relay-eth-contract-address=0x313a4a4dcf95da8e020b5375c0f8f732b7b4f15b \
|
||||
--rln-relay-cred-path=/keystore/keystore.json \
|
||||
--rln-relay-cred-password="${RLN_RELAY_CRED_PASSWORD}" \
|
||||
--rln-relay-user-message-limit=100 \
|
||||
--rln-relay-user-message-limit=20 \
|
||||
--rln-relay-chain-id=59141 \
|
||||
--execute
|
||||
|
||||
@ -7,8 +7,8 @@ echocol()
|
||||
printf "$COL${1}${NC}\n"
|
||||
}
|
||||
|
||||
RLN_CONTRACT_ADDRESS=0xB9cd878C90E49F797B4431fBF4fb333108CB90e6
|
||||
TOKEN_CONTRACT_ADDRESS=0x185A0015aC462a0aECb81beCc0497b649a64B9ea
|
||||
RLN_CONTRACT_ADDRESS=0x313a4a4dcf95da8e020b5375c0f8f732b7b4f15b
|
||||
TOKEN_CONTRACT_ADDRESS=0xd17e184e3c1941585a3edcb3a10367da6326d844
|
||||
REQUIRED_AMOUNT=5
|
||||
|
||||
check_eth_balance() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user