Node CLI Cheatsheet
CLI Cheatsheet
- Always be careful with the capitalized words
- Specify
--chain-id
Wallet Management
Add Wallet Specify the value <wallet>
with your own wallet name
zenrockd keys add wallet
Recover Wallet
zenrockd keys add wallet --recover
List Wallet
zenrockd keys list
Delete Wallet
zenrockd keys delete wallet
Check Wallet Balance
zenrockd q bank balances $(zenrockd keys show wallet -a)
Validator Management
Please adjust <wallet>
, MONIKER
, YOUR_KEYBASE_ID
, YOUR_DETAILS
, YOUUR_WEBSITE_URL
Create Validator (Staking)
zenrockd tendermint show-validator
nano /root/.zrchain/validator.json
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"......"},
"amount": "1000000urock",
"moniker": "",
"identity": "",
"website": "https://service.vinjan.xyz",
"security": "",
"details": "Staking Provider-IBC Relayer",
"commission-rate": "0.05",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.05",
"min-self-delegation": "1"
}
zenrockd tx validation create-validator $HOME/.zrchain/validator.json \
--from=wallet \
--chain-id=diamond-1 \
--gas-adjustment 1.5 \
--gas-prices 27urock \
--gas auto
Edit Validator
zenrockd tx staking edit-validator \
--new-moniker="Vinjan.Inc" \
--identity="7C66E36EA2B71F68" \
--commission-rate="0.1" \
--chain-id=diamond-1 \
--from=wallet \
--gas-adjustment 1.5 \
--gas-prices 27urock \
--gas auto
Unjail Validator
zenrockd tx slashing unjail --from wallet --chain-id diamond-1
Check Jailed Reason
zenrockd query slashing signing-info $(zenrockd tendermint show-validator)
Token Management
Withdraw Rewards
zenrockd tx distribution withdraw-all-rewards --from wallet --chain-id diamond-1 --gas-adjustment 1.5 --gas-prices 27urock --gas auto
Withdraw Rewards with Comission
zenrockd tx staking delegate $(zenrockd keys show wallet --bech val -a) 1000000urock --from wallet --chain-id diamond-1 --gas-adjustment 1.5 --gas-prices 27urock --gas auto
Delegate Token to your own validator
zenrockd tx staking delegate $(zenrockd keys show wallet --bech val -a) 1000000urock --from wallet --chain-id diamond-1 --gas-adjustment 1.5 --gas-prices 27urock --gas auto
Delegate Token to other validator
zenrockd tx staking redelegate $(zenrockd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000urock --from wallet ---chain-id diamond-1 --gas-adjustment 1.5 --gas-prices 27urock --gas auto
Unbond Token from your validator
zenrockd tx staking unbond $(zenrockd keys show wallet --bech val -a) 1000000urock --from wallet --chain-id diamond-1 --gas-adjustment 1.5 --gas-prices 27urock --gas auto
Send Token to another wallet
zenrockd tx bank send wallet <TO_WALLET_ADDRESS> 1000000urock --from wallet --chain-id diamond-1 --gas-adjustment 1.5 --gas-prices 27urock --gas auto
Governance
Vote You can change the value of yes
to no
,abstain
,nowithveto
zenrockd tx gov vote 2 yes --from wallet --chain-id diamond-1 --gas-adjustment 1.5 --gas-prices 27urock --gas auto
Other
Set Your own Custom Ports You can change value CUSTOM_PORT=44
To any other ports
- PORT=18
sed -i.bak -e "s%^node = \"tcp://localhost:26657\"%node = \"tcp://localhost:18657\"%" $HOME/.zrchain/config/client.toml
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:18658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:18657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:18060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:18656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":18660\"%" $HOME/.zrchain/config/config.toml
sed -i.bak -e "s%^address = \"tcp://localhost:1317\"%address = \"tcp://localhost:18317\"%; s%^address = \"localhost:9090\"%address = \"localhost:18090\"%" $HOME/.zrchain/config/app.toml
Enable Indexing usually enabled by default
sed -i 's|^indexer *=.*|indexer = "kv"|' $HOME/.zrchain/config/config.toml
Disable Indexing
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.zrchain/config/config.toml
Reset Chain Data
zenrockd tendermint unsafe-reset-all --home $HOME/.zrchain --keep-addr-book
Delete Node
WARNING! Use this command wisely Backup your key first it will remove Defund from your system
sudo systemctl stop zenrockd
sudo systemctl disable zenrockd
sudo rm /etc/systemd/system/zenrockd.service
sudo systemctl daemon-reload
rm -f $(which zenrockd)
rm -rf .zrchain
rm -rf zenrock