shine-solana/shine/scripts/CreateGovernmentTokenAndDAO/02_mint_token_to_wallet.sh

22 lines
736 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
set -euo pipefail
#
# RU: Выпускает ровно 1 membership-токен на указанный кошелек.
# Если у кошелька уже есть >=1 токен, скрипт завершится ошибкой.
# EN: Mints exactly 1 membership token to the given wallet.
# If wallet already has >=1 token, script exits with error.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CONFIG_PATH="$SCRIPT_DIR/governance_token.config.env"
WALLET="${1:-}"
if [[ -z "$WALLET" ]]; then
echo "Использование:"
echo " $0 <wallet>"
echo "Usage:"
echo " $0 <wallet>"
exit 1
fi
node "$SCRIPT_DIR/js/02_mint_membership_to_wallet_exec.js" "$CONFIG_PATH" "$WALLET"