From 1e9fd5067d2262bea3cf793f09edb200fe90e700 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Tue, 30 Jul 2024 11:53:03 +0000 Subject: [PATCH] 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: https://git.vdb.to/cerc-io/fixturenet-laconicd-stack/pulls/7 Co-authored-by: Prathamesh Musale Co-committed-by: Prathamesh Musale --- .../config/fixturenet-laconicd/create-fixturenet.sh | 10 ++++++---- .../stacks/fixturenet-laconicd/README.md | 4 ++-- .../stacks/fixturenet-laconicd/scripts/genesis.sh | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/stack-orchestrator/config/fixturenet-laconicd/create-fixturenet.sh b/stack-orchestrator/config/fixturenet-laconicd/create-fixturenet.sh index 5e24c0f..47d0e5b 100644 --- a/stack-orchestrator/config/fixturenet-laconicd/create-fixturenet.sh +++ b/stack-orchestrator/config/fixturenet-laconicd/create-fixturenet.sh @@ -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 diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/README.md b/stack-orchestrator/stacks/fixturenet-laconicd/README.md index 38eea37..d86902a 100644 --- a/stack-orchestrator/stacks/fixturenet-laconicd/README.md +++ b/stack-orchestrator/stacks/fixturenet-laconicd/README.md @@ -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 diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh index a92c67f..37a0e5e 100755 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh @@ -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