Update 'update.sh'

This commit is contained in:
vvzvlad 2024-06-09 03:28:21 +03:00
parent a6ea49764e
commit fc0ab5feb5

View File

@ -1,12 +1,13 @@
#!/bin/bash #!/bin/bash
if [ "$#" -ne 2 ]; then if [ "$#" -ne 3 ]; then
echo "Usage: $0 <wallet_address> <private_key>" echo "Usage: $0 <wallet_address> <private_key> <rpc_url>"
exit 1 exit 1
fi fi
WALLET_ADDRESS=$1 WALLET_ADDRESS=$1
PRIVATE_KEY=$2 PRIVATE_KEY=$2
RPC_URL=$3
# Список файлов # Список файлов
FILES=( FILES=(
@ -18,4 +19,5 @@ for FILE in "${FILES[@]}"; do
EXPANDED_FILE=$(eval echo "$FILE") EXPANDED_FILE=$(eval echo "$FILE")
sed -i "s/###WALLET_ADDRESS###/$WALLET_ADDRESS/g" "$EXPANDED_FILE" sed -i "s/###WALLET_ADDRESS###/$WALLET_ADDRESS/g" "$EXPANDED_FILE"
sed -i "s/###PRIVATE_KEY###/$PRIVATE_KEY/g" "$EXPANDED_FILE" sed -i "s/###PRIVATE_KEY###/$PRIVATE_KEY/g" "$EXPANDED_FILE"
sed -i "s/###RPC_URL###/$RPC_URL/g" "$EXPANDED_FILE"
done done