Perform alps allocations
This commit is contained in:
parent
d769c6e055
commit
74e5f470e2
@ -5,7 +5,7 @@ set -e
|
||||
set -u
|
||||
|
||||
# Check args
|
||||
if [ "$#" -ne 2 ]; then
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 <testnet-deployment-dir-absolute>"
|
||||
exit 1
|
||||
fi
|
||||
@ -36,6 +36,9 @@ echo "Exported state from testnet"
|
||||
docker run -it \
|
||||
-v ./$MAINNET_GENESIS_DIR:/root/.laconicd \
|
||||
-v ./scripts:/scripts \
|
||||
-e "CHAIN_ID=$CHAIN_ID" \
|
||||
-e "EARLY_SUPPORTS_ACC_ADDRESS=$EARLY_SUPPORTS_ACC_ADDRESS" \
|
||||
-e "LPS_LOCKUP_ACC_ADDRESS=$LPS_LOCKUP_ACC_ADDRESS" \
|
||||
cerc/laconicd:local bash -c "/scripts/genesis.sh"
|
||||
|
||||
# Copy over the genesis file to output folder
|
||||
|
||||
@ -10,6 +10,20 @@ CHAINID=${CHAINID:-"laconic-mainnet"}
|
||||
MONIKER=${MONIKER:-"mainnet-node"}
|
||||
NODE_HOME="/root/.laconicd"
|
||||
|
||||
EARLY_SUPPORTS_ACC_ADDRESS=${EARLY_SUPPORTS_ACC_ADDRESS}
|
||||
LPS_LOCKUP_ACC_ADDRESS=${LPS_LOCKUP_ACC_ADDRESS}
|
||||
|
||||
if [ -z "$EARLY_SUPPORTS_ACC_ADDRESS" ] || [ -z "$LPS_LOCKUP_ACC_ADDRESS" ]; then
|
||||
echo "EARLY_SUPPORTS_ACC_ADDRESS or LPS_LOCKUP_ACC_ADDRESS not provided, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# alps allocations
|
||||
# Total supply: 129600 * 10^18 alps
|
||||
EARLY_SUPPORTS_ALLOC="12960000000000000000000" # Early supports: 12960 * 10^18 alps (10% of total supply)
|
||||
LOCKUP_ALLOC="116640000000000000000000" # Lockup: 116640 * 10^18 alps (90% of total supply)
|
||||
LPS_LOCKUP_MODULE_ACCOUNT="lps_lockup"
|
||||
|
||||
testnet_state_file="$NODE_HOME/testnet-state.json"
|
||||
mainnet_genesis_file="$NODE_HOME/config/genesis.json"
|
||||
|
||||
@ -22,7 +36,12 @@ jq --slurpfile nested $testnet_state_file '.consensus.auth = $nested[0].consensu
|
||||
|
||||
# Update any module params if required here
|
||||
|
||||
# TODO: Perform alps allocations
|
||||
# Perform alps allocations
|
||||
laconicd genesis add-genesis-account $ADDRESS $EARLY_SUPPORTS$DENOM --keyring-backend $KEYRING
|
||||
|
||||
# Use zero address to add an account for lps_lockup
|
||||
zero_address="laconic1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqklcls0"
|
||||
laconicd genesis add-genesis-account $zero_address $EARLY_SUPPORTS$DENOM --keyring-backend $KEYRING --module-name $LPS_LOCKUP_MODULE_ACCOUNT
|
||||
|
||||
# Ensure that resulting genesis file is valid
|
||||
laconicd genesis validate
|
||||
|
||||
Loading…
Reference in New Issue
Block a user