Cheatsheet
Very usefull command
Your node peer
echo $(initiad tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.initia/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Service
Check sync
initiad status 2>&1 | jq
Check service status
sudo systemctl status initiad
Check Logs
sudo journalctl -u initiad -f -o cat
Start Service
sudo systemctl start initiad
Stop Service
sudo systemctl stop initiad
Restart Service
sudo systemctl restart initiad
Enable Service
sudo systemctl enable initiad
Disable service
sudo systemctl disable initiad
Reload service
sudo systemctl daemon-reload
Key Manage
Add walet
initiad keys add $wallet
Add exsisting wallet
initiad keys add $wallet --recover
List of wallet
initiad keys list
Delete wallet
initiad keys delete $wallet
Check balance
initiad q bank balances $WALLET_ADDRESS
Export keys (save to wallet.backup)
initiad keys export $WALLET
View EVM Prived Key
initiad keys unsafe-export-eth-key $WALLET
Import Key (restore from wallet.backup)
initiad keys import $WALLET wallet.backup
Token
Withdraw all rewards
initiad tx distribution withdraw-all-rewards --from $WALLET --chain-id initiation-1 --gas auto --gas-adjustment 1.5 --fees 0uinit
Withdraw rewards and commission from your validator
initiad tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id initiation-1 --gas auto --gas-adjustment 1.5 --fees 0uinit -y
Check Balance
initiad query bank balances $WALLET_ADDRESS
Delegate to Yourself
initiad tx staking delegate $(wardend keys show $WALLET --bech val -a) 1000000uinit --from $WALLET --chain-id initiation-1 --gas auto --gas-adjustment 1.5 --fees 0unit -y
Delegate
initiad tx staking delegate <TO_VALOPER_ADDRESS> 1000000uinit --from $WALLET --chain-id initiation-1 --gas auto --gas-adjustment 1.5 --fees 0uinit -y
Redelegate and Stake to Others validator
initiad tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uinit --from $WALLET --chain-id initiation-1 --gas auto --gas-adjustment 1.5 --fees uinit -y
Unbound
initiad tx staking unbond $(initiad keys show $WALLET --bech val -a) 1000000uinit --from $WALLET --chain-id buenavista-1 --gas auto --gas-adjustment 1.5 --fees 0uinit -y
Transfer funds
initiad tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uinit --gas auto --gas-adjustment 1.5 --fees 0uinit -y
Validator Operation
Create new Validator
initiad tx mstaking create-validator \
--amount="5000000uinit" \
--pubkey=$(initiad tendermint show-validator) \
--moniker="test" \
--chain-id=initiation-1 \
--from=wallet \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--identity="" \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.15uinit \
-y
Edit Exsisting Validator
initiad mstaking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "put your keybase here" \
--details "" \
--from $WALLET \
--website "yoursite.com" \
--security-contact "yourmail.com" \
--chain-id initiation-1 \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.15uinit \
-y
Validator Info
initiad status 2>&1 | jq
Validator details
initiad q staking validator $(initiad keys show $WALLET --bech val -a)
Jailing Info
initiad q slashing signing-info $(initiad tendermint show-validator)
Slashing parameters
initiad q slashing params
Unjail validator
initiad tx slashing unjail --from $WALLET --chain-id initiation-1 --gas auto --gas-adjustment 1.5 --fees 0uinit -y
Active Set Validators List
initiad q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl
Check Validator key
[[ $(initiad q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(initiad status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
Signing info
initiad q slashing signing-info $(initiad tendermint show-validator)
Governance
Create New Text Proposal
initiad tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uinit \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 --fees 0uinit \
-y
List of Proposal
initiad query gov proposals
View proposal
initiad query gov proposal 1
Vote Proposal
initiad tx gov vote 1 yes --from $WALLET --chain-id initiation-1 --gas auto --gas-adjustment 1.5 --fees 0uinit -y
Delete Initia Node
All of Your Initia Node Data will be Deleted
cd $HOME
sudo systemctl stop initiad
sudo systemctl disable initiad
sudo rm /etc/systemd/system/initiad.service
sudo systemctl daemon-reload
sudo rm -f $(which initiad)
sudo rm -rf $HOME/.initia
sudo rm -rf $HOME/initia
Last updated