Skip to content

Commit

Permalink
run local node scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
expertdicer committed Jul 4, 2023
1 parent 4a1cbbf commit 94aaef7
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions scripts/runnode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

KEY="mykey"
CHAINID="test-1"
MONIKER="localtestnet"
KEYALGO="secp256k1"
KEYRING="test"
LOGLEVEL="info"
# to trace evm
#TRACE="--trace"
TRACE=""

# remove existing daemon
rm -rf ~/.migaloo*

migalood config keyring-backend $KEYRING
migalood config chain-id $CHAINID

# if $KEY exists it should be deleted
echo "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" | migalood keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO --recover

migalood init $MONIKER --chain-id $CHAINID

# Allocate genesis accounts (cosmos formatted addresses)
migalood add-genesis-account $KEY 100000000000000000000000000stake --keyring-backend $KEYRING

# Sign genesis transaction
migalood gentx $KEY 1000000000000000000000stake --keyring-backend $KEYRING --chain-id $CHAINID

# Collect genesis tx
migalood collect-gentxs

# Run this to ensure everything worked and that the genesis file is setup correctly
migalood validate-genesis

if [[ $1 == "pending" ]]; then
echo "pending mode is on, please wait for the first block committed."
fi

# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
migalood start --pruning=nothing --minimum-gas-prices=0.0001stake --rpc.laddr tcp://0.0.0.0:26657

0 comments on commit 94aaef7

Please sign in to comment.