forked from cerc-io/laconicd-deprecated
update init.sh script (#241)
Changed the removal lines to removed everything using a wildcard Changed the the common parameters into variables Fixes #238
This commit is contained in:
parent
70cc4af3b4
commit
eaaae0e3fd
28
init.sh
28
init.sh
@ -1,26 +1,33 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rm -rf ~/.emintcli
|
|
||||||
rm -rf ~/.emintd
|
KEY="ethermintkey"
|
||||||
|
CHAINID=8
|
||||||
|
MONIKER="mymoniker"
|
||||||
|
|
||||||
|
# remove existing chain environment, data and
|
||||||
|
rm -rf ~/.emint*
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
emintcli config keyring-backend test
|
emintcli config keyring-backend test
|
||||||
emintcli keys add mykey
|
|
||||||
|
# if mykey exists it should be deleted
|
||||||
|
emintcli keys add $KEY
|
||||||
|
|
||||||
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
||||||
emintd init mymoniker --chain-id 8
|
emintd init $MONIKER --chain-id $CHAINID
|
||||||
|
|
||||||
# Set up config for CLI
|
# Set up config for CLI
|
||||||
emintcli config chain-id 8
|
emintcli config chain-id $CHAINID
|
||||||
emintcli config output json
|
emintcli config output json
|
||||||
emintcli config indent true
|
emintcli config indent true
|
||||||
emintcli config trust-node true
|
emintcli config trust-node true
|
||||||
|
|
||||||
# Allocate genesis accounts (cosmos formatted addresses)
|
# Allocate genesis accounts (cosmos formatted addresses)
|
||||||
emintd add-genesis-account $(emintcli keys show mykey -a) 1000000000000000000photon,1000000000000000000stake
|
emintd add-genesis-account $(emintcli keys show $KEY -a) 1000000000000000000photon,1000000000000000000stake
|
||||||
|
|
||||||
# Sign genesis transaction
|
# Sign genesis transaction
|
||||||
emintd gentx --name mykey --keyring-backend test
|
emintd gentx --name $KEY --keyring-backend test
|
||||||
|
|
||||||
# Collect genesis tx
|
# Collect genesis tx
|
||||||
emintd collect-gentxs
|
emintd collect-gentxs
|
||||||
@ -28,5 +35,10 @@ emintd collect-gentxs
|
|||||||
# Run this to ensure everything worked and that the genesis file is setup correctly
|
# Run this to ensure everything worked and that the genesis file is setup correctly
|
||||||
emintd validate-genesis
|
emintd validate-genesis
|
||||||
|
|
||||||
|
# Command to run the rest server in a different terminal/window
|
||||||
|
echo -e '\n\nRun this rest-server command in a different terminal/window:'
|
||||||
|
echo -e "emintcli rest-server --laddr \"tcp://localhost:8545\" --unlock-key $KEY --chain-id $CHAINID\n\n"
|
||||||
|
|
||||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
||||||
emintd start --pruning=nothing
|
emintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user