2024-06-08 20:13:10 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-06-09 03:28:21 +03:00
|
|
|
if [ "$#" -ne 3 ]; then
|
|
|
|
echo "Usage: $0 <wallet_address> <private_key> <rpc_url>"
|
2024-06-08 20:13:10 +03:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
WALLET_ADDRESS=$1
|
|
|
|
PRIVATE_KEY=$2
|
2024-06-09 03:28:21 +03:00
|
|
|
RPC_URL=$3
|
2024-06-08 20:13:10 +03:00
|
|
|
|
|
|
|
# Список файлов
|
|
|
|
FILES=(
|
|
|
|
"./projects/hello-world/container/config.json"
|
|
|
|
"./projects/hello-world/contracts/Makefile"
|
|
|
|
)
|
|
|
|
|
|
|
|
for FILE in "${FILES[@]}"; do
|
|
|
|
EXPANDED_FILE=$(eval echo "$FILE")
|
|
|
|
sed -i "s/###WALLET_ADDRESS###/$WALLET_ADDRESS/g" "$EXPANDED_FILE"
|
|
|
|
sed -i "s/###PRIVATE_KEY###/$PRIVATE_KEY/g" "$EXPANDED_FILE"
|
2024-06-09 03:28:21 +03:00
|
|
|
sed -i "s/###RPC_URL###/$RPC_URL/g" "$EXPANDED_FILE"
|
2024-06-08 20:13:10 +03:00
|
|
|
done
|