Useful commands
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export SOMMELIER_CHAIN_ID="sommelier-3"" >> $HOME/.bash_profile
source $HOME/.bash_profile
WALLET MANAGEMENT
Add Wallet Specify the value <wallet> with your own wallet name
#Add new wallet
sommelier keys add wallet
#Recover Wallet
sommelier keys add wallet --recover
#List Wallet
sommelier keys list
#Delete Wallet
sommelier keys delete wallet
#Check Wallet Balance
sommelier q bank balances $(sommelier keys show wallet -a)
VALIDATOR MANAGEMENT
Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL
#Create Validator
sommelier tx staking create-validator \
--amount=10000000usomm \
--pubkey=$(sommelier tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$SOMMELIER_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=10usomm\
-y
#Edit Validator
sommelier tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$SOMMELIER_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10usomm\
-y
#Unjail Validator
sommelier tx slashing unjail --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y
#Check Jailed Reason
sommelier query slashing signing-info $(sommelier tendermint show-validator)
TOKEN MANAGEMENT
#Withdraw Rewards
sommelier tx distribution withdraw-all-rewards --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y
#Withdraw Rewards with Comission
sommelier tx distribution withdraw-rewards $(sommelier keys show wallet --bech val -a) --commission --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y
#Delegate Token to your own validator
sommelier tx staking delegate $(sommelier keys show wallet --bech val -a) 1000000usomm --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y
#Delegate Token to other validator
sommelier tx staking redelegate $(sommelier keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000usomm --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y
#Unbond Token from your validator
sommelier tx staking unbond $(sommelier keys show wallet --bech val -a) 1000000usomm --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y
#Send Token to another wallet
sommelier tx bank send wallet <TO_WALLET_ADDRESS> 1000000usomm --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y
GOVERNANCE
#Vote, You can change the value of yes to no,abstain,nowithveto
sommelier tx gov vote 1 yes --from wallet --chain-id $SOMMELIER_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10usomm -y
#List all proposals
sommelier query gov proposals
#Create new text proposal
sommelier tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000usomm \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=10usomm\
-y
SERVICES MANAGEMENT
# Reload Service
sudo systemctl daemon-reload
# Enable Service
sudo systemctl enable sommelier
# Disable Service
sudo systemctl disable sommelier
# Start Service
sudo systemctl start sommelier
# Stop Service
sudo systemctl stop sommelier
# Restart Service
sudo systemctl restart sommelier
# Check Service Status
sudo systemctl status sommelier
# Check Service Logs
sudo journalctl -u sommelier -f --no-hostname -o cat
UTILITY
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.sommelier/config/config.toml
#Get Validator info
sommelier status 2>&1 | jq .ValidatorInfo
#Get denom info
sommelier q bank denom-metadata -oj | jq
#Get sync status
sommelier status 2>&1 | jq .SyncInfo.catching_up
#Get latest height
sommelier status 2>&1 | jq .SyncInfo.latest_block_height
#Reset Node
sommelier tendermint unsafe-reset-all --home $HOME/.sommelier --keep-addr-book
DELETE NODE
WARNING! Use this command wisely Backup your key first it will remove node from your system
sudo systemctl stop sommelier && sudo systemctl disable sommelier && sudo rm /etc/systemd/system/sommelier.service && sudo systemctl daemon-reload && sudo rm -rf $(which sommelier) && rm -rf $HOME/.sommelier && rm -rf $HOME/go/bin/sommelier
Last updated