Cheat Sheet
A Tendermint cheat sheet is a quick reference for essential commands to control Tendermint blockchains.
Service Operations
to start, stop, restart, reload, enable, or disable the mantrachaind
service, use the following commands:
// start service
sudo systemctl start mantrachaind
// stop service
sudo systemctl stop mantrachaind
// restart service
sudo systemctl restart mantrachaind
// reload service
sudo systemctl daemon-reload
// enable service
sudo systemctl enable mantrachaind
// disable service
sudo systemctl disable mantrachaind
to check the status of the mantrachaind
service, use the following command:
// Check logs
sudo journalctl -u mantrachaind -f
// Check service status
sudo systemctl status mantrachaind
// Sync info
mantrachaind status 2>&1 | jq .SyncInfo
// Node info
mantrachaind status 2>&1 | jq .NodeInfo
Managing Keys
Add New Wallet
mantrachaind keys add $WALLET
Add New Wallet
mantrachaind keys add $WALLET --recover
Restore executing wallet
mantrachaind keys add $WALLET --recover
List All Wallets
mantrachaind keys list
Delete wallet
mantrachaind keys delete $WALLET
Check Balance
mantrachaind q bank balances $(mantrachaind keys show $WALLET -a)
Export Key (save to wallet.backup)
mantrachaind keys export $WALLET
View EVM Prived Key
mantrachaind keys unsafe-export-eth-key $WALLET
Import Key (restore from wallet.backup)
mantrachaind keys import $WALLET wallet.backup
Validator Operation
Create Validator (replace the values with your own)
mantrachaind tx staking create-validator \
--amount 1000000uside \
--pubkey $(mantrachaind tendermint show-validator) \
--moniker "your-moniker-name" \
--identity "your-keybase-id" \
--details "your-details" \
--website "your-website" \
--security-contact "your-email" \
--chain-id side-testnet-2 \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.005uside \
-y
Edit validator (replace the values with your own)
mantrachaind tx staking edit-validator \
--new-moniker "your-moniker-name" \
--identity "your-keybase-id" \
--details "your-details" \
--website "your-website" \
--security-contact "your-email" \
--chain-id side-testnet-2 \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.005uside \
-y
View validator details
mantrachaind q staking validator $(mantrachaind keys show wallet --bech val -a)
Unjail validator
mantrachaind tx slashing unjail --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Validator jail reason
mantrachaind q slashing signing-info $(mantrachaind tendermint show-validator)
List active validator
mantrachaind q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
List inactive validator
mantrachaind q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Managing Token
Withdraw reward from all validator
mantrachaind tx distribution withdraw-all-rewards --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Withdraw reward and commission
mantrachaind tx distribution withdraw-rewards $(mantrachaind keys show wallet --bech val -a) --commission --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Delegate tokens to your validator
mantrachaind tx staking delegate $(mantrachaind keys show wallet --bech val -a) 1000000uside --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Delegate token to other validator, change <to-valoper-address>
as you like
mantrachaind tx staking delegate `<to-valoper-address>` 1000000uside --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Redelegate to another validator
mantrachaind tx staking redelegate $(mantrachaind keys show wallet --bech val -a) `<to-valoper-address>` 1000000uside --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Unbond token from your own validator
mantrachaind tx staking unbond $(mantrachaind keys show wallet --bech val -a) 1000000uside --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Send token to the wallet
mantrachaind tx bank send wallet <to-wallet-address> 1000000uside --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Governance
Query list proposal
mantrachaind query gov proposals
View proposal by ID
mantrachaind query gov proposal 1
Vote option yes
mantrachaind tx gov vote 1 yes --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Vote option no
mantrachaind tx gov vote 1 no --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Vote option asbtain
mantrachaind tx gov vote 1 abstain --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside -y
Vote option NoWithVeto
mantrachaind tx gov vote 1 NoWithVeto --from wallet --chain-id side-testnet-2 --gas-adjustment 1.4 --gas auto --gas