From 333a76bdf81cd00254ced0b970b7bbca081cdfd1 Mon Sep 17 00:00:00 2001 From: Jongwhan Lee <51560997+leejw51crypto@users.noreply.github.com> Date: Fri, 16 Jul 2021 18:40:33 +0900 Subject: [PATCH] build: refactor `init.sh` (#294) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> --- init.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/init.sh b/init.sh index bf3d4328..ab72c201 100755 --- a/init.sh +++ b/init.sh @@ -2,17 +2,20 @@ KEY="mykey" CHAINID="ethermint-2" MONIKER="localtestnet" +KEYRING="test" +KEYALGO="eth_secp256k1" +LOGLEVEL="info" # remove existing daemon and client rm -rf ~/.ethermintd* make install -ethermintd config keyring-backend test +ethermintd config keyring-backend $KEYRING ethermintd config chain-id $CHAINID # if $KEY exists it should be deleted -ethermintd keys add $KEY --keyring-backend test --algo "eth_secp256k1" +ethermintd keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO # Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer) ethermintd init $MONIKER --chain-id $CHAINID @@ -58,10 +61,10 @@ if [[ $1 == "pending" ]]; then fi # Allocate genesis accounts (cosmos formatted addresses) -ethermintd add-genesis-account $KEY 100000000000000000000000000aphoton --keyring-backend test +ethermintd add-genesis-account $KEY 100000000000000000000000000aphoton --keyring-backend $KEYRING # Sign genesis transaction -ethermintd gentx $KEY 1000000000000000000000aphoton --keyring-backend test --chain-id $CHAINID +ethermintd gentx $KEY 1000000000000000000000aphoton --keyring-backend $KEYRING --chain-id $CHAINID # Collect genesis tx ethermintd collect-gentxs @@ -74,4 +77,4 @@ if [[ $1 == "pending" ]]; then fi # Start the node (remove the --pruning=nothing flag if historical queries are not needed) -ethermintd start --pruning=nothing --trace --log_level info --minimum-gas-prices=0.0001aphoton +ethermintd start --pruning=nothing --trace --log_level $LOGLEVEL --minimum-gas-prices=0.0001aphoton