forked from zerone/testnet-chain
60 lines
2.2 KiB
Bash
60 lines
2.2 KiB
Bash
KEY1="key1"
|
|
KEY2="key2"
|
|
KEY3="key3"
|
|
CHAINID="canto_1264-1"
|
|
MONIKER="validator-1x"
|
|
KEYRING="test"
|
|
KEYALGO="eth_secp256k1"
|
|
LOGLEVEL="info"
|
|
# to trace evm
|
|
#TRACE="--trace"
|
|
TRACE=""
|
|
|
|
# validate dependencies are installed
|
|
command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; }
|
|
|
|
# Reinstall daemon
|
|
rm -rf ~/.cantod*
|
|
# make install-testing
|
|
|
|
# Set client config
|
|
# cantod config set client chain-id canto_7701-1
|
|
cantod config set client chain-id $CHAINID
|
|
cantod config set client keyring-backend $KEYRING
|
|
|
|
# if $KEY exists it should be deleted
|
|
cantod keys add $KEY1 --keyring-backend $KEYRING --algo $KEYALGO
|
|
|
|
cantod init $MONIKER --chain-id $CHAINID
|
|
|
|
|
|
# 种子节点(启动时尝试连接这些节点)
|
|
# seeds = "<seed_node_id>@<ip>:<port>,<seed_node_id>@<ip>:<port>"
|
|
|
|
# 持久对等节点(始终保持连接)
|
|
# persistent_peers = "<peer_node_id>@<ip>:<port>,<peer_node_id>@<ip>:<port>"
|
|
# cantod collect-gentxs 2>&1 | jq '.app_message.genutil.gen_txs[0].body.memo'
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
sed -i '' 's/minimum-gas-prices = "0acanto"/minimum-gas-prices = "0.0001acanto"/g' $HOME/.cantod/config/app.toml
|
|
sed -i '' 's/persistent_peers = ""/persistent_peers = "a4eec64d88314553eee08206d8e2a986562ef310@192.168.110.186:26656"/g' $HOME/.cantod/config/config.toml
|
|
else
|
|
sed -i 's/minimum-gas-prices = "0acanto"/minimum-gas-prices = "0.0001acanto"/g' $HOME/.cantod/config/app.toml
|
|
|
|
sed -i 's/persistent_peers = ""/persistent_peers = "a4eec64d88314553eee08206d8e2a986562ef310@192.168.110.186:26656"/g' $HOME/.cantod/config/config.toml
|
|
|
|
|
|
fi
|
|
|
|
# 强制覆盖
|
|
cp -f config/genesis.json $HOME/.cantod/config/genesis.json
|
|
|
|
# cantod start --pruning=nothing $TRACE --log_level info --minimum-gas-prices=0.0001acanto --json-rpc.ws-address '0.0.0.0:8546' --json-rpc.address '0.0.0.0:8545' --json-rpc.api eth,txpool,personal,net,debug,web3 --rpc.laddr 'tcp://0.0.0.0:26657' --api.enable --chain-id canto_1264-1
|
|
|
|
|
|
# evmosd start \
|
|
# --metrics "$TRACE" \
|
|
# --log_level $LOGLEVEL \
|
|
# --minimum-gas-prices=0.0001$BASE_DENOM \
|
|
# --json-rpc.api eth,txpool,personal,net,debug,web3 \
|
|
# --home "$HOMEDIR" \
|
|
# --chain-id "$CHAINID" |