Useful commands

# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export CHEQD_CHAIN_ID="cheqd-mainnet-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile

WALLET MANAGEMENT

Add Wallet Specify the value <wallet> with your own wallet name

#Add new wallet
cheqd-noded keys add wallet

#Recover Wallet
cheqd-noded keys add wallet --recover

#List Wallet
cheqd-noded keys list

#Delete Wallet
cheqd-noded keys delete wallet

#Check Wallet Balance
cheqd-noded q bank balances $(cheqd-noded keys show wallet -a)

VALIDATOR MANAGEMENT

Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL

#Create Validator
cheqd-noded tx staking create-validator \
--amount=1000000ncheq \
--pubkey=$(cheqd-noded tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$CHEQD_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=25ncheq \ 
-y

#Edit Validator
cheqd-noded tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$CHEQD_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=25ncheq \ 
-y

#Unjail Validator
cheqd-noded tx slashing unjail --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Check Jailed Reason
cheqd-noded query slashing signing-info $(cheqd-noded tendermint show-validator)

TOKEN MANAGEMENT

#Withdraw Rewards
cheqd-noded tx distribution withdraw-all-rewards --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Withdraw Rewards with Comission
cheqd-noded tx distribution withdraw-rewards $(cheqd-noded keys show wallet --bech val -a) --commission --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Delegate Token to your own validator
cheqd-noded tx staking delegate $(cheqd-noded keys show wallet --bech val -a) 100000ncheq --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Delegate Token to other validator
cheqd-noded tx staking redelegate $(cheqd-noded keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000ncheq --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Unbond Token from your validator
cheqd-noded tx staking unbond $(cheqd-noded keys show wallet --bech val -a) 100000ncheq --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#Send Token to another wallet
cheqd-noded tx bank send wallet <TO_WALLET_ADDRESS> 100000ncheq --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

GOVERNANCE

#Vote, You can change the value of yes to no,abstain,nowithveto
cheqd-noded tx gov vote 1 yes --from wallet --chain-id $CHEQD_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 25ncheq -y

#List all proposals
cheqd-noded query gov proposals

#Create new text proposal
cheqd-noded tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000ncheq \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=25ncheq \ 
-y 

SERVICES MANAGEMENT

# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable cheqd-noded

# Disable Service
sudo systemctl disable cheqd-noded

# Start Service
sudo systemctl start cheqd-noded

# Stop Service
sudo systemctl stop cheqd-noded

# Restart Service
sudo systemctl restart cheqd-noded

# Check Service Status
sudo systemctl status cheqd-noded

# Check Service Logs
sudo journalctl -u cheqd-noded -f --no-hostname -o cat

UTILITY

#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.cheqdnode/config/config.toml

#Get Validator info
cheqd-noded status 2>&1 | jq .ValidatorInfo

#Get denom info
cheqd-noded q bank denom-metadata -oj | jq

#Get sync status
cheqd-noded status --node tcp://localhost:11657  2>&1 | jq .SyncInfo.catching_up

#Get latest height
cheqd-noded status --node tcp://localhost:11657 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
cheqd-noded tendermint unsafe-reset-all --home $HOME/.cheqdnode --keep-addr-book

DELETE NODE

sudo systemctl stop cheqd-noded && sudo systemctl disable cheqd-noded && sudo rm /etc/systemd/system/cheqd-noded.service && sudo systemctl daemon-reload && sudo rm -rf $(which cheqd-noded) && rm -rf $HOME/.cheqdnode

Last updated