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
kopid keys add wallet
Recover Wallet
kopid keys add wallet --recover
List Wallet
kopid keys list
Delete Wallet
kopid keys delete wallet
Check Wallet Balance
kopid q bank balances $(kopid keys show wallet -a)
Validator Management
Please adjust <wallet>
, MONIKER
, YOUR_KEYBASE_ID
, YOUR_DETAILS
, YOUUR_WEBSITE_URL
Create Validator (Staking)
kopid tendermint show-validator
nano /root/.kopid/validator.json
{
"pubkey": ,
"amount": "2000000ukopi",
"moniker": "",
"identity": "",
"website": "",
"security": "",
"details": "r",
"commission-rate": "0.05",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.05",
"min-self-delegation": "1"
}
kopid tx staking create-validator $HOME/.kopid/validator.json \
--from wallet \
--chain-id kopi-test-5
Edit Validator
kopid tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--website="" \
--chain-id=kopi-test-5 \
--from=wallet
Unjail Validator
kopid tx slashing unjail --from wallet --chain-id kopi-test-5 --gas auto -y
Check Jailed Reason
kopid query slashing signing-info $(kopid tendermint show-validator)
Token Management
Withdraw Rewards
kopid tx distribution withdraw-all-rewards --from wallet --chain-id kopi-test-5 --gas auto -y
Withdraw Rewards with Comission
kopid tx distribution withdraw-rewards $(kopid keys show wallet --bech val -a) --commission --from wallet --chain-id kopi-test-5 --gas auto -y
Delegate Token to your own validator
kopid tx staking delegate $(kopid keys show wallet --bech val -a) 1000000ukopi --from wallet ---chain-id kopi-test-5 --gas auto -y
Delegate Token to other validator
kopid tx staking redelegate $(kopid keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000ukopi --from wallet --chain-id kopi-test-5 --gas auto -y
Unbond Token from your validator
kopid tx staking unbond $(kopid keys show wallet --bech val -a) 1000000ukopi --from wallet --chain-id kopi-test-5 --gas auto -y
Send Token to another wallet
kopid tx bank send wallet <TO_WALLET_ADDRESS> 1000000ukopi --from wallet --chain-id kopi-test-5 --gas auto -y
Governance
Vote You can change the value of yes
to no
,abstain
,nowithveto
kopid tx gov vote 1 yes --from wallet --chain-id kopi-test-5 --gas auto -y
Other
Set Your own Custom Ports You can change value CUSTOM_PORT=44
To any other ports
- PORT=15
sed -i.bak -e "s%^node = \"tcp://localhost:26657\"%node = \"tcp://localhost:15657\"%" $HOME/.kopid/config/client.toml
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:15658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:15657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:15060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:15656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":15660\"%" $HOME/.kopid/config/config.toml
sed -i.bak -e "s%^address = \"tcp://localhost:1317\"%address = \"tcp://localhost:15317\"%; s%^address = \"localhost:9090\"%address = \"localhost:15090\"%" $HOME/.kopid/config/app.toml
Enable Indexing usually enabled by default
sed -i 's|^indexer *=.*|indexer = "kv"|' $HOME/.kopid/config/config.toml
Disable Indexing
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.kopid/config/config.toml
Reset Chain Data
kopid tendermint unsafe-reset-all --home $HOME/.kopid --keep-addr-book
Delete Node
WARNING! Use this command wisely Backup your key first it will remove Defund from your system
sudo systemctl stop kopid
sudo systemctl disable kopid
sudo rm /etc/systemd/system/kopid.service
sudo systemctl daemon-reload
rm -f $(which kopid)
rm -rf .kopid
rm -rf kopi