2024-08-26 17:20:25 +03:00
|
|
|
#!/usr/bin/env bash
|
2024-08-26 00:21:09 +03:00
|
|
|
|
|
|
|
if [ "$#" -ne 3 ]; then
|
|
|
|
echo "Usage: $0 <mnemonic> <wallet> <rpc_url>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
MNEMONIC=$1
|
|
|
|
WALLET=$2
|
|
|
|
RPC_URL=$3
|
|
|
|
|
|
|
|
# List of files
|
|
|
|
FILES=(
|
|
|
|
"./config.json"
|
|
|
|
)
|
|
|
|
|
|
|
|
for FILE in "${FILES[@]}"; do
|
|
|
|
EXPANDED_FILE=$(eval echo "$FILE")
|
|
|
|
sed -i "s|###MNEMONIC###|$MNEMONIC|g" "$EXPANDED_FILE"
|
|
|
|
sed -i "s|###WALLET###|$WALLET|g" "$EXPANDED_FILE"
|
|
|
|
sed -i "s|###RPC_URL###|$RPC_URL|g" "$EXPANDED_FILE"
|
|
|
|
done
|