Skip to main content

CLI Cheatsheet

Essential CLI commands for managing your DoraFactory node and validator.

Key Management

Add New Key

dorad keys add KEY

Recover Key (via existing mnemonic)

dorad keys add KEY --recover

List All Keys

dorad keys list

Delete Key

dorad keys delete KEY

Wallet Operations

Check Wallet Balance

dorad q bank balances $(dorad keys show KEY -a) --node https://m-dora-rpc.ruangnode.com:443

Send Tokens

dorad tx bank send YOUR_KEY RECEIVER_ADDRESS 1000000peaka \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Withdraw Rewards from All Validators

dorad tx distribution withdraw-all-rewards \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Withdraw Rewards Including Commission

dorad tx distribution withdraw-rewards VALIDATOR_ADDRESS \
--commission \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Staking Operations

Delegate Tokens to Yourself

dorad tx staking delegate $(dorad keys show KEY --bech val -a) 1000000peaka \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Delegate Tokens to Validator

dorad tx staking delegate VALIDATOR_ADDRESS 1000000peaka \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Redelegate Tokens to Another Validator

dorad tx staking redelegate $(dorad keys show KEY --bech val -a) VALIDATOR_ADDRESS 1000000peaka \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Unbond Tokens from Your Validator

dorad tx staking unbond $(dorad keys show KEY --bech val -a) 1000000peaka \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Governance

List All Proposals

dorad query gov proposals --node https://m-dora-rpc.ruangnode.com:443

Check Vote

dorad query gov proposal PROPOSAL_NUMBER \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 \
--output json | jq

Vote on Proposal

Vote options: yes, no, no_with_veto, abstain

dorad tx gov vote PROPOSAL_NUMBER VOTE_OPTION \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Validator Management

Create Validator

dorad tx staking create-validator \
--amount 1000000peaka \
--commission-max-change-rate "0.05" \
--commission-max-rate "0.10" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--pubkey=$(dorad tendermint show-validator) \
--moniker "YOUR_MONIKER" \
--website "https://yourwebsite.com" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--security-contact="your@email.com" \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Edit Validator

dorad tx staking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id vota-ash \
--commission-rate 0.05 \
--from KEY \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka

Unjail Validator

dorad tx slashing unjail \
--chain-id vota-ash \
--node https://m-dora-rpc.ruangnode.com:443 --fees 1000000000000000peaka \
--from KEY

Check Jail Reason

dorad query slashing signing-info $(dorad tendermint show-validator)

Get Validator Details

dorad q staking validator $(dorad keys show KEY --bech val -a)

Node Maintenance

Get Validator Info

dorad status 2>&1 | jq .ValidatorInfo

Get Sync Info

dorad status 2>&1 | jq .SyncInfo

Get Node Peer

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

Check if Validator Key is Correct

[[ $(dorad q staking validator $(dorad keys show KEY --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(dorad status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"

Get Live Peers

curl -sS https://m-dora-rpc.ruangnode.com:443/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'

Set Minimum Gas Price

sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"10000000000peaka\"/" $HOME/.dora/config/app.toml

Enable Prometheus

sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.dora/config/config.toml

Reset Chain Data

dorad tendermint unsafe-reset-all --keep-addr-book --home $HOME/.dora

Service Management

Reload Service Configuration

sudo systemctl daemon-reload

Enable Service

sudo systemctl enable dorad

Disable Service

sudo systemctl disable dorad

Start Service

sudo systemctl start dorad

Stop Service

sudo systemctl stop dorad

Restart Service

sudo systemctl restart dorad

Check Service Status

sudo systemctl status dorad

Check Service Logs

sudo journalctl -u dorad -f --no-hostname -o cat

Remove Node

Complete Node Removal

cd $HOME
sudo systemctl stop dorad
sudo systemctl disable dorad
sudo rm /etc/systemd/system/dorad.service
sudo systemctl daemon-reload
rm -f $(which dorad)
rm -rf $HOME/.dora
rm -rf $HOME/dora