Useful commands

# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SHENTU_CHAIN_ID="shentu-2.2"" >> $HOME/.bash_profile
source $HOME/.bash_profile

WALLET MANAGEMENT

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

#Add new wallet
shentud keys add wallet

#Recover Wallet
shentud keys add wallet --recover

#List Wallet
shentud keys list

#Delete Wallet
shentud keys delete wallet

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

VALIDATOR MANAGEMENT

Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL

#Create Validator
shentud tx staking create-validator \
--amount=1000000uctk \
--pubkey=$(shentud tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$SHENTU_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=1uctk\ 
-y

#Edit Validator
shentud tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$SHENTU_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uctk\ 
-y

#Unjail Validator
shentud tx slashing unjail --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

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

TOKEN MANAGEMENT

#Withdraw Rewards
shentud tx distribution withdraw-all-rewards --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Withdraw Rewards with Comission
shentud tx distribution withdraw-rewards $(shentud keys show wallet --bech val -a) --commission --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Delegate Token to your own validator
shentud tx staking delegate $(shentud keys show wallet --bech val -a) 100000uctk --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Delegate Token to other validator
shentud tx staking redelegate $(shentud keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 100000uctk --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Unbond Token from your validator
shentud tx staking unbond $(shentud keys show wallet --bech val -a) 100000uctk --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#Send Token to another wallet
shentud tx bank send wallet <TO_WALLET_ADDRESS> 100000uctk --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

GOVERNANCE

#Vote, You can change the value of yes to no,abstain,nowithveto
shentud tx gov vote 1 yes --from wallet --chain-id $SHENTU_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uctk -y

#List all proposals
shentud query gov proposals

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

SERVICES MANAGEMENT

# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable shentud

# Disable Service
sudo systemctl disable shentud

# Start Service
sudo systemctl start shentud

# Stop Service
sudo systemctl stop shentud

# Restart Service
sudo systemctl restart shentud

# Check Service Status
sudo systemctl status shentud

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

UTILITY

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

#Get Validator info
shentud status 2>&1 | jq .ValidatorInfo

#Get denom info
shentud q bank denom-metadata -oj | jq

#Get sync status
shentud status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
shentud status 2>&1 | jq .SyncInfo.latest_block_height

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

DELETE NODE

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

Last updated