Add lps_lockup module account to lock up a percentage of total tokens supply
All checks were successful
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Successful in 4m45s
Integration Tests / test-integration (pull_request) Successful in 1m22s
Unit Tests / test-unit (pull_request) Successful in 1m25s
E2E Tests / test-e2e (pull_request) Successful in 2m23s
SDK Tests / sdk_tests_authority_auctions (pull_request) Successful in 10m50s
SDK Tests / sdk_tests (pull_request) Successful in 14m50s
All checks were successful
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Successful in 4m45s
Integration Tests / test-integration (pull_request) Successful in 1m22s
Unit Tests / test-unit (pull_request) Successful in 1m25s
E2E Tests / test-e2e (pull_request) Successful in 2m23s
SDK Tests / sdk_tests_authority_auctions (pull_request) Successful in 10m50s
SDK Tests / sdk_tests (pull_request) Successful in 14m50s
This commit is contained in:
parent
c14f1d3b00
commit
0faf796186
@ -33,6 +33,8 @@ modules:
|
||||
- account: registry
|
||||
- account: record_rent
|
||||
- account: authority_rent
|
||||
- account: lps_lockup
|
||||
permissions: []
|
||||
- name: bank
|
||||
config:
|
||||
"@type": cosmos.bank.module.v1.Module
|
||||
|
@ -9,6 +9,16 @@ STAKING_AMOUNT=${STAKING_AMOUNT:-"1000000000000000"}
|
||||
MIN_GAS_PRICE=${MIN_GAS_PRICE:-"0.001"}
|
||||
LOGLEVEL=${LOGLEVEL:-"info"}
|
||||
|
||||
# lps_lockup module account address
|
||||
LPS_LOCKUP_MODULE_ACCOUNT_ADDRESS="laconic1mprsxp9jqe0d0lp88fxuccthwgy7tqgt5x9y65"
|
||||
|
||||
# TODO: Try using `lnt` denom
|
||||
# Locked amount: 116640 * 10^18 alnt (90% of 129600 * 10^18 alnt)
|
||||
LOCKED_AMOUNT="116640000000000000000000"
|
||||
|
||||
# Early supports: 12960 * 10^18 alnt (10% of 129600 * 10^18 alnt)
|
||||
EARLY_SUPPORTS="12960000000000000000000"
|
||||
|
||||
input_genesis_file=${GENESIS_FILE}
|
||||
|
||||
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data" ]; then
|
||||
@ -117,7 +127,24 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data" ]; then
|
||||
|
||||
# Allocate genesis accounts (cosmos formatted addresses)
|
||||
# 10^30 alnt | 10^12 lnt
|
||||
laconicd genesis add-genesis-account $KEY 1000000000000000000000000000000$DENOM --keyring-backend $KEYRING
|
||||
laconicd genesis add-genesis-account $KEY $EARLY_SUPPORTS$DENOM --keyring-backend $KEYRING
|
||||
|
||||
# Add lps_lockup module account to auth accounts
|
||||
echo "Adding lps_lockup module account to auth accounts"
|
||||
update_genesis '.app_state["auth"]["accounts"] += [{"@type": "/cosmos.auth.v1beta1.ModuleAccount", "base_account": {"address": "'$LPS_LOCKUP_MODULE_ACCOUNT_ADDRESS'", "pub_key": null, "account_number": "0", "sequence": "0"}, "name": "lps_lockup", "permissions": []}]'
|
||||
|
||||
# Allocate locked amount to lps_lockup module account
|
||||
echo "Allocating locked amount to lps_lockup module account"
|
||||
update_genesis '.app_state["bank"]["balances"] += [{"address": "'$LPS_LOCKUP_MODULE_ACCOUNT_ADDRESS'", "coins": [{"denom": "'$DENOM'", "amount": "'$LOCKED_AMOUNT'"}]}]'
|
||||
|
||||
# Update the supply to include the locked amount
|
||||
echo "Updating total supply to include locked amount"
|
||||
# Get the existing supply amount
|
||||
EXISTING_SUPPLY=$(jq -r '.app_state.bank.supply[0].amount' $HOME/.laconicd/config/genesis.json)
|
||||
# Calculate the new total supply by adding the locked amount
|
||||
TOTAL_SUPPLY=$(bc <<< "$EXISTING_SUPPLY + $LOCKED_AMOUNT")
|
||||
echo "New total supply: $TOTAL_SUPPLY"
|
||||
update_genesis '.app_state["bank"]["supply"][0]["amount"] = "'$TOTAL_SUPPLY'"'
|
||||
|
||||
# Sign genesis transaction
|
||||
# 10^15 alnt
|
||||
|
Loading…
Reference in New Issue
Block a user