diff --git a/setup_wizard.sh b/setup_wizard.sh index 8d7da18..b45be9f 100755 --- a/setup_wizard.sh +++ b/setup_wizard.sh @@ -8,7 +8,7 @@ echocol() } RLN_CONTRACT_ADDRESS=0xB9cd878C90E49F797B4431fBF4fb333108CB90e6 -TOKEN_CONTRACT_ADDRESS= +TOKEN_CONTRACT_ADDRESS=0x185A0015aC462a0aECb81beCc0497b649a64B9ea REQUIRED_AMOUNT=5 check_eth_balance() { @@ -46,7 +46,7 @@ if [ -f keystore/keystore.json ]; then fi fi -# Ensure Foundry (cast & foundryup) is available for token approve calls +# Ensure Foundry (cast & foundryup) is available for token mint/approve calls if ! command -v cast >/dev/null 2>&1; then echocol "\n Foundry toolkit (cast) not found. Installing Foundry... \n" curl -L https://foundry.paradigm.xyz | bash @@ -152,7 +152,7 @@ STORAGE_SIZE=$STORAGE_SIZE POSTGRES_SHM=$POSTGRES_SHM" > ./.env echocol "" -echocol "Checking your TST token balance..." +echocol "Checking your TTT token balance..." USER_BALANCE_RAW=$(cast call $TOKEN_CONTRACT_ADDRESS "balanceOf(address)(uint256)" $ETH_TESTNET_ACCOUNT --rpc-url $RLN_RELAY_ETH_CLIENT_ADDRESS 2>/dev/null) USER_BALANCE=$(echo "$USER_BALANCE_RAW" | awk '{print $1}') USER_BALANCE=$(echo "$USER_BALANCE / 10^18" | bc) @@ -162,20 +162,20 @@ if [ -z "$USER_BALANCE" ]; then exit 1 fi -echocol "Your current TST token balance is: $USER_BALANCE" +echocol "Your current TTT token balance is: $USER_BALANCE" echocol "Required amount: $REQUIRED_AMOUNT" echocol "" -APPROVE_CHOICE="y" +MINT_CHOICE="y" if [ "$USER_BALANCE" -ge "$REQUIRED_AMOUNT" ]; then - echocol "You already have enough TST tokens to register." - read -p "Do you want to approve more tokens? (y/N): " APPROVE_CHOICE + echocol "You already have enough TTT tokens to register." + read -p "Do you want to mint more tokens? (y/N): " MINT_CHOICE fi -if [ "$APPROVE_CHOICE" = "y" ] || [ "$APPROVE_CHOICE" = "Y" ]; then - ./register_rln.sh --approve; +if [ "$MINT_CHOICE" = "y" ] || [ "$MINT_CHOICE" = "Y" ]; then + ./register_rln.sh --mint; else - ./register_rln.sh --no-approve; + ./register_rln.sh --no-mint; fi echocol "" @@ -186,4 +186,4 @@ echocol "Your node is ready! enter the following command to start it:" read -p "Press ENTER to continue..." foo docker-compose up -d echocol "✅ Node started successfully!" -echocol "" +echocol "" \ No newline at end of file