#!/bin/bash # Exit on error set -e set -u # Note: Needs to be run in a docker container with image cerc/laconicd:local KEYRING="test" NODE_HOME="/root/.laconicd" EARLY_SUPPORTS_ACC_ADDRESS=${EARLY_SUPPORTS_ACC_ADDRESS} if [ -z "$EARLY_SUPPORTS_ACC_ADDRESS" ]; then echo "EARLY_SUPPORTS_ACC_ADDRESS not provided, exiting..." exit 1 fi # lps allocations # Total supply: 129600 lps EARLY_SUPPORTS_ALLOC="25920" # Early supports: 25920 lps (20% of total supply) LOCKUP_ALLOC="103680" # Lockup: 103680 lps (80% of total supply) LPS_LOCKUP_MODULE_ACCOUNT="lps_lockup" LPS_DENOM="lps" testnet_state_file="$NODE_HOME/testnet-state.json" distribution_file="$NODE_HOME/distribution.json" mainnet_genesis_file="$NODE_HOME/config/genesis.json" # Update any module params if required here update_genesis() { jq "$1" $NODE_HOME/config/genesis.json > $NODE_HOME/config/tmp_genesis.json && mv $NODE_HOME/config/tmp_genesis.json $NODE_HOME/config/genesis.json } # Set distribution community tax to 1 for disabling staking rewards and redirect them to the community pool update_genesis '.app_state["distribution"]["params"]["community_tax"]="1.000000000000000000"' # Increase threshold in gov proposals for making it difficult to spend community pool funds echo "Setting high threshold for accepting governance proposal" update_genesis '.app_state["gov"]["params"]["quorum"]="1.000000000000000000"' # Set expedited threshold to 100% update_genesis '.app_state["gov"]["params"]["expedited_threshold"]="1.000000000000000000"' # Set normal threshold to 99% since it needs to be lesser than expedited threshold update_genesis '.app_state["gov"]["params"]["threshold"]="0.990000000000000000"' # Perform lps allocations laconicd genesis add-genesis-account $EARLY_SUPPORTS_ACC_ADDRESS $EARLY_SUPPORTS_ALLOC$LPS_DENOM --keyring-backend $KEYRING --append laconicd genesis add-genesis-lockup-account lps_lockup $distribution_file $LOCKUP_ALLOC$LPS_DENOM # Ensure that resulting genesis file is valid laconicd genesis validate