From d849a0a0775d5387b5892f3e90db8037423c29c0 Mon Sep 17 00:00:00 2001 From: sdohuajia <63113882+sdohuajia@users.noreply.github.com> Date: Sat, 27 Jul 2024 17:07:02 +0800 Subject: [PATCH] Update Waku.sh --- Waku.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Waku.sh b/Waku.sh index be5aacc..84d1e49 100644 --- a/Waku.sh +++ b/Waku.sh @@ -74,15 +74,21 @@ function install_node() { cd nwaku-compose cp .env.example .env - # 替换.env文件中的内容 - ETH_CLIENT_ADDRESS="https://sepolia.infura.io/v3/" - ETH_TESTNET_KEY="" - RLN_RELAY_CRED_PASSWORD="my_secure_keystore_password" + # 获取用户输入 + read -rp "请输入 ETH_CLIENT_ADDRESS(Sepolia ETH 的 RPC 地址):" ETH_CLIENT_ADDRESS + read -rp "请输入 ETH_TESTNET_KEY(有测试网 ETH 的私钥):" ETH_TESTNET_KEY + read -rp "请输入 RLN_RELAY_CRED_PASSWORD(设置密码):" RLN_RELAY_CRED_PASSWORD + # 替换.env文件中的内容 sed -i "s|ETH_CLIENT_ADDRESS=.*|RLN_RELAY_ETH_CLIENT_ADDRESS=$ETH_CLIENT_ADDRESS|" .env sed -i "s|ETH_TESTNET_KEY=.*|ETH_TESTNET_KEY=$ETH_TESTNET_KEY|" .env sed -i "s|RLN_RELAY_CRED_PASSWORD=.*|RLN_RELAY_CRED_PASSWORD=$RLN_RELAY_CRED_PASSWORD|" .env + echo "已将以下内容写入 .env 文件:" + echo "RLN_RELAY_ETH_CLIENT_ADDRESS=$ETH_CLIENT_ADDRESS" + echo "ETH_TESTNET_KEY=$ETH_TESTNET_KEY" + echo "RLN_RELAY_CRED_PASSWORD=$RLN_RELAY_CRED_PASSWORD" + echo "请继续编辑.env文件(如果需要):" echo "nano .env"