Update Waku.sh

This commit is contained in:
sdohuajia 2024-07-27 17:07:02 +08:00 committed by GitHub
parent 6bfdd260c6
commit d849a0a077
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

14
Waku.sh
View File

@ -74,15 +74,21 @@ function install_node() {
cd nwaku-compose cd nwaku-compose
cp .env.example .env cp .env.example .env
# 替换.env文件中的内容 # 获取用户输入
ETH_CLIENT_ADDRESS="https://sepolia.infura.io/v3/<key>" read -rp "请输入 ETH_CLIENT_ADDRESSSepolia ETH 的 RPC 地址):" ETH_CLIENT_ADDRESS
ETH_TESTNET_KEY="<YOUR_TESTNET_PRIVATE_KEY_HERE>" read -rp "请输入 ETH_TESTNET_KEY有测试网 ETH 的私钥):" ETH_TESTNET_KEY
RLN_RELAY_CRED_PASSWORD="my_secure_keystore_password" 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_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|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 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 "请继续编辑.env文件如果需要"
echo "nano .env" echo "nano .env"