Skip to content

Commit

Permalink
feat: add script
Browse files Browse the repository at this point in the history
  • Loading branch information
hoank101 committed Jun 12, 2024
1 parent b1f4372 commit 5a62bd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/picad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"errors"
"fmt"
"io"
"os"

Expand Down Expand Up @@ -96,6 +97,8 @@ func NewRootCmd() (*cobra.Command, app.EncodingConfig) {
return err
}

fmt.Println("hoank123", initClientCtx.Offline)

// This needs to go after ReadFromClientConfig, as that function
// sets the RPC client needed for SIGN_MODE_TEXTUAL. This sign mode
// is only available if the client is online.
Expand Down
3 changes: 2 additions & 1 deletion scripts/run-node-two-validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ $BINARY add-genesis-account $KEY1 100000000000000000000000000ppica --keyring-bac
# Sign genesis transaction
$BINARY gentx $KEY 10030009994127689ppica --keyring-backend $KEYRING --chain-id $CHAINID --home $HOME_DIR --moniker val1
mv $HOME_DIR/config/priv_validator_key.json $HOME_DIR/config/priv_validator_key0.json
$BINARY gentx $KEY1 100000ppica --keyring-backend $KEYRING --chain-id $CHAINID --home $HOME_DIR --output-document $HOME_DIR/config/gentx/1.json
$BINARY gentx $KEY1 1003000999412768ppica --keyring-backend $KEYRING --chain-id $CHAINID --home $HOME_DIR --output-document $HOME_DIR/config/gentx/1.json
mv $HOME_DIR/config/priv_validator_key.json $HOME_DIR/config/priv_validator_key1.json
update_test_genesis '.app_state["gov"]["params"]["voting_period"]="20s"'
update_test_genesis '.app_state["gov"]["params"]["expedited_voting_period"]="10s"'
update_test_genesis '.app_state["stakingmiddleware"]["params"]["blocks_per_epoch"]="5"'
update_test_genesis '.app_state["mint"]["params"]["mint_denom"]="'$DENOM'"'
update_test_genesis '.app_state["gov"]["params"]["min_deposit"]=[{"denom":"'$DENOM'","amount": "1"}]'
update_test_genesis '.app_state["crisis"]["constant_fee"]={"denom":"'$DENOM'","amount":"1000"}'
update_test_genesis '.app_state["slashing"]["params"]["signed_blocks_window"]="6"'

# Collect genesis tx
$BINARY collect-gentxs --home $HOME_DIR
Expand Down

0 comments on commit 5a62bd9

Please sign in to comment.