Useful commands

# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export HEDGE_CHAIN_ID="berberis-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile

WALLET MANAGEMENT

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

#Add new wallet
hedged keys add wallet

#Recover Wallet
hedged keys add wallet --recover

#List Wallet
hedged keys list

#Delete Wallet
hedged keys delete wallet

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

VALIDATOR MANAGEMENT

Please adjust , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUR_WEBSITE_URL

#Create Validator
hedged tx staking create-validator \
--amount=10000000uhedge \
--pubkey=$(hedged tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$HEDGE_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=10uhedge\ 
-y

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

#Unjail Validator
hedged tx slashing unjail --from wallet --chain-id $HEDGE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uhedge -y

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

TOKEN MANAGEMENT

#Withdraw Rewards
hedged tx distribution withdraw-all-rewards --from wallet --chain-id $HEDGE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uhedge -y

#Withdraw Rewards with Comission
hedged tx distribution withdraw-rewards $(hedged keys show wallet --bech val -a) --commission --from wallet --chain-id $HEDGE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uhedge -y

#Delegate Token to your own validator
hedged tx staking delegate $(hedged keys show wallet --bech val -a) 1000000uhedge --from wallet --chain-id $HEDGE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uhedge -y

#Delegate Token to other validator
hedged tx staking redelegate $(hedged keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uhedge --from wallet --chain-id $HEDGE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uhedge -y

#Unbond Token from your validator
hedged tx staking unbond $(hedged keys show wallet --bech val -a) 1000000uhedge --from wallet --chain-id $HEDGE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uhedge -y

#Send Token to another wallet
hedged tx bank send wallet <TO_WALLET_ADDRESS> 1000000uhedge --from wallet --chain-id $HEDGE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uhedge -y

GOVERNANCE

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

#List all proposals
hedged query gov proposals

#Create new text proposal
hedged tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uhedge \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=10uhedge\ 
-y 

SERVICES MANAGEMENT

# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable hedged

# Disable Service
sudo systemctl disable hedged

# Start Service
sudo systemctl start hedged

# Stop Service
sudo systemctl stop hedged

# Restart Service
sudo systemctl restart hedged

# Check Service Status
sudo systemctl status hedged

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

UTILITY

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

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

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

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

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

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

DELETE NODE

sudo systemctl stop hedged && sudo systemctl disable hedged && sudo rm /etc/systemd/system/hedged.service && sudo systemctl daemon-reload && sudo rm -rf $(which hedged) && rm -rf $HOME/.hedge && rm -rf $HOME/go/bin/hedged

Last updated