Remove unused script
This commit is contained in:
parent
c9eb1099fc
commit
be81ee4639
@ -1,45 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
# Early supports: 12960 * 10^18 alps (10% of 129600 * 10^18 alps)
|
||||
EARLY_SUPPORTS="12960000000000000000000"
|
||||
|
||||
DENOM=alps
|
||||
|
||||
input_genesis_file=$INPUT_GENESIS_FILE
|
||||
if [ ! -f ${input_genesis_file} ]; then
|
||||
echo "Genesis file not provided, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$RECIPIENT_ADDRESS" ]; then
|
||||
echo "Recipient address not provided, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
update_genesis() {
|
||||
jq "$1" ${input_genesis_file} > ${input_genesis_file}.tmp &&
|
||||
mv ${input_genesis_file}.tmp ${input_genesis_file}
|
||||
}
|
||||
|
||||
# Add new account to auth.accounts
|
||||
update_genesis '.app_state["auth"]["accounts"] += [{"@type": "/cosmos.auth.v1beta1.BaseAccount", "address": "'$RECIPIENT_ADDRESS'", "pub_key": null, "account_number": "0", "sequence": "0"}]'
|
||||
|
||||
# Add balance for the new account
|
||||
update_genesis '.app_state["bank"]["balances"] += [{"address": "'$RECIPIENT_ADDRESS'", "coins": [{"denom": "'$DENOM'", "amount": "'$EARLY_SUPPORTS'"}]}]'
|
||||
|
||||
# Get current supply
|
||||
CURRENT_SUPPLY=$(jq -r '.app_state["bank"]["supply"][0]["amount"]' ${input_genesis_file})
|
||||
|
||||
# Calculate new supply
|
||||
NEW_SUPPLY=$((CURRENT_SUPPLY + EARLY_SUPPORTS))
|
||||
|
||||
# Update total supply
|
||||
update_genesis '.app_state["bank"]["supply"][0]["amount"] = "'$NEW_SUPPLY'"'
|
||||
|
||||
echo "Genesis file updated with new account ${RECIPIENT_ADDRESS} and allocated ${EARLY_SUPPORTS} ${DENOM}"
|
Loading…
Reference in New Issue
Block a user