Update laconicd scripts to use alnt token denom (#7)

Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

Reviewed-on: cerc-io/fixturenet-laconicd-stack#7
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
Prathamesh Musale 2024-07-30 11:53:03 +00:00 committed by nabarun
parent becb8af290
commit 1e9fd5067d
3 changed files with 10 additions and 8 deletions

View File

@ -29,7 +29,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 photon
laconicd init $MONIKER --chain-id $CHAINID --default-denom alnt
if [ -f ${input_genesis_file} ]; then
# Use provided genesis config
@ -93,10 +93,12 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
# Allocate genesis accounts (cosmos formatted addresses)
laconicd genesis add-genesis-account $KEY 100000000000000000000000000photon --keyring-backend $KEYRING
# 10^30 alnt | 10^12 lnt
laconicd genesis add-genesis-account $KEY 1000000000000000000000000000000alnt --keyring-backend $KEYRING
# Sign genesis transaction
laconicd genesis gentx $KEY 1000000000000000000000photon --keyring-backend $KEYRING --chain-id $CHAINID
# 10^24 alnt | 10^6 lnt
laconicd genesis gentx $KEY 1000000000000000000000000alnt --keyring-backend $KEYRING --chain-id $CHAINID
# Collect genesis tx
laconicd genesis collect-gentxs
@ -111,7 +113,7 @@ fi
laconicd start \
--pruning=nothing \
--log_level $LOGLEVEL \
--minimum-gas-prices=0.0001photon \
--minimum-gas-prices=1alnt \
--api.enable \
--rpc.laddr="tcp://0.0.0.0:26657" \
--gql-server --gql-playground

View File

@ -115,7 +115,7 @@ Instructions for running a laconicd fixturenet along with registry CLI and conso
# Gas limit for txs (default: 200000)
CERC_LACONICD_GAS=
# Max fees for txs (default: 200000photon)
# Max fees for txs (default: 200000alnt)
CERC_LACONICD_FEES=
```
@ -156,7 +156,7 @@ laconic-so deployment --dir laconic-console-deployment start
ALICE_PK=$(echo y | laconic-so deployment --dir fixturenet-laconicd-deployment exec laconicd "laconicd keys export alice --unarmored-hex --unsafe")
# Create a bond:
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry bond create --type photon --quantity 100000000000 --user-key $ALICE_PK" | jq -r '.bondId'
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry bond create --type alnt --quantity 1000000000000 --user-key $ALICE_PK" | jq -r '.bondId'
```
## Demo

View File

@ -14,7 +14,7 @@ onboarding_state_file="$NODE_HOME/stage0-onboarding-state.json"
stage1_allocations_file="$NODE_HOME/stage1-allocations.json"
stage1_genesis_file="$NODE_HOME/config/genesis.json"
laconicd init $STAGE1_MONIKER --chain-id $CHAINID --default-denom photon
laconicd init $STAGE1_MONIKER --chain-id $CHAINID --default-denom alnt
# Update onboarding module state with participants from stage0
participants=$(jq -c '.participants' $onboarding_state_file)
@ -29,7 +29,7 @@ jq -c '.[]' "$stage1_allocations_file" | while IFS= read -r line; do
balance=$(jq -r '.balance' <<< "$line")
# Add a genesis account for participant's laconic address with required balance
laconicd genesis add-genesis-account $cosmos_address ${balance}photon
laconicd genesis add-genesis-account $cosmos_address ${balance}alnt
done
# Ensure that resulting genesis file is valid