From b5a76a920e85fec0b3519a9aca04f9ad837a6f1d Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 7 Aug 2024 11:25:01 +0000 Subject: [PATCH] Update node initialization script (#49) Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675) Reviewed-on: https://git.vdb.to/cerc-io/laconicd/pulls/49 Co-authored-by: Prathamesh Musale Co-committed-by: Prathamesh Musale --- scripts/init.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index 128da4e69..1697ef7cb 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,10 +1,12 @@ #!/bin/bash KEY="alice" -CHAINID="laconic_9000-1" -MONIKER="localtestnet" -KEYRING="test" -LOGLEVEL="${LOGLEVEL:-info}" +CHAINID=${CHAINID:-"laconic_9000-1"} +MONIKER=${MONIKER:-"localtestnet"} +KEYRING=${KEYRING:-"test"} +DENOM=${DENOM:-"alnt"} +STAKING_AMOUNT=${STAKING_AMOUNT:-"1000000000000000"} +LOGLEVEL="${LOGLEVEL:-"info"}" input_genesis_file=${GENESIS_FILE} @@ -29,7 +31,7 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then laconicd keys add $KEY --keyring-backend $KEYRING # Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer) - laconicd init $MONIKER --chain-id $CHAINID --default-denom alnt + laconicd init $MONIKER --chain-id $CHAINID --default-denom $DENOM if [ -f ${input_genesis_file} ]; then # Use provided genesis config @@ -94,11 +96,11 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then # Allocate genesis accounts (cosmos formatted addresses) # 10^30 alnt | 10^12 lnt - laconicd genesis add-genesis-account $KEY 1000000000000000000000000000000alnt --keyring-backend $KEYRING + laconicd genesis add-genesis-account $KEY 1000000000000000000000000000000$DENOM --keyring-backend $KEYRING # Sign genesis transaction - # 10^24 alnt | 10^6 lnt - laconicd genesis gentx $KEY 1000000000000000000000000alnt --keyring-backend $KEYRING --chain-id $CHAINID + # 10^15 alnt + laconicd genesis gentx $KEY $STAKING_AMOUNT$DENOM --keyring-backend $KEYRING --chain-id $CHAINID # Collect genesis tx laconicd genesis collect-gentxs @@ -113,7 +115,7 @@ fi laconicd start \ --pruning=nothing \ --log_level $LOGLEVEL \ - --minimum-gas-prices=1alnt \ + --minimum-gas-prices=1$DENOM \ --api.enable \ --rpc.laddr="tcp://0.0.0.0:26657" \ --gql-server --gql-playground