Useful commands

Service operations ⚙️

Check logs

sudo journalctl -u haqqd -f

Start service

sudo systemctl start haqqd

Stop service

sudo systemctl stop haqqd

Restart service

sudo systemctl restart haqqd

Check service status

sudo systemctl status haqqd

Reload services

sudo systemctl daemon-reload

Enable Service

sudo systemctl enable haqqd

Disable Service

sudo systemctl disable haqqd

Sync info

haqqd status 2>&1 | jq .SyncInfo

Node info

haqqd status 2>&1 | jq .NodeInfo

Your node peer

echo $(haqqd tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.haqqd/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')

Key management

Add New Wallet

haqqd keys add $WALLET

Restore executing wallet

haqqd keys add $WALLET --recover

List All Wallets

haqqd keys list

Delete wallet

haqqd keys delete $WALLET

Check Balance

haqqd q bank balances $(haqqd keys show $WALLET -a)

Export Key (save to wallet.backup)

haqqd keys export $WALLET

Import Key (restore from wallet.backup)

haqqd keys import $WALLET wallet.backup

Tokens

Withdraw all rewards

haqqd tx distribution withdraw-all-rewards --from $WALLET --chain-id haqq_11235-1 --gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM"

Withdraw rewards and commission from your validator

haqqd tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id haqq_11235-1 --gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" -y

Check your balance

haqqd query bank balances $WALLET_ADDRESS

Delegate to Yourself

haqqd tx staking delegate $(haqqd keys show $WALLET --bech val -a) 1000000aISLM --from $WALLET --chain-id haqq_11235-1 --gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" -y

Delegate

haqqd tx staking delegate <TO_VALOPER_ADDRESS> 1000000aISLM --from $WALLET --chain-id haqq_11235-1 --gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" -y

Redelegate Stake to Another Validator

haqqd tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000aISLM --from $WALLET --chain-id haqq_11235-1 --gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" -y

Unbond

haqqd tx staking unbond $(haqqd keys show $WALLET --bech val -a) 1000000aISLM --from $WALLET --chain-id haqq_11235-1 --gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" -y

Transfer Funds

haqqd tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000aISLM --gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" -y

Validator operations

Create New Validator

haqqd tx staking create-validator \
--amount 1000000aISLM \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(haqqd tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxxxx" \
--chain-id haqq_11235-1 \
--gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" \
-y

Edit Existing Validator

haqqd tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxx" \
--from $WALLET \
--chain-id haqq_11235-1 \
--gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" \
-y

Validator info

haqqd status 2>&1 | jq .ValidatorInfo

Validator Details

haqqd q staking validator $(haqqd keys show $WALLET --bech val -a)

Jailing info

haqqd q slashing signing-info $(haqqd tendermint show-validator)

Unjail validator

haqqd tx slashing unjail --broadcast-mode block --from $WALLET --chain-id haqq_11235-1 --gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" -y

Active Validators List

haqqd q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl

Check Validator key

[[ $(haqqd q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(haqqd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"

Signing info

haqqd q slashing signing-info $(haqqd tendermint show-validator)

Governance

Create New Text Proposal

haqqd  tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000aISLM \
--type Text \
--from $WALLET \
--gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" \
-y 

Proposals List

haqqd query gov proposals

View proposal

haqqd query gov proposal 1

Vote

haqqd tx gov vote 1 yes --from $WALLET --chain-id haqq_11235-1  --gas-adjustment=1.15 --gas auto --gas-prices "27500000000aISLM" -y

Delete node

sudo systemctl stop haqqd
sudo systemctl disable haqqd
sudo rm -rf /etc/systemd/system/haqqd.service
sudo rm $(which haqqd)
sudo rm -rf $HOME/.haqqd
sed -i "/HAQQ_/d" $HOME/.bash_profile

Last updated