Node CLI Cheatsheet

  • Network Type: Testnet
  • Chain-id: chiado_10010-1
  • Current Node version: v0.5.2
  • CLI Cheatsheet

    • Always be careful with the capitalized words
    • Specify --chain-id

    Usefull Command

    wardend status 2>&1 | jq .sync_info

    Wallet Management

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

    wardend keys add wallet

    Recover Wallet

    wardend keys add wallet --recover

    List Wallet

    wardend keys list

    Delete Wallet

    wardend keys delete wallet

    Check Wallet Balance

    wardend q bank balances $(wardend keys show wallet -a)

    Validator Management

    Please adjust <wallet> , MONIKER , YOUR_KEYBASE_ID , YOUR_DETAILS , YOUUR_WEBSITE_URL

    Create Validator (Staking)

    • Check Your Pubkey
    wardend tendermint show-validator
    • Make File validator.json
    nano /root/.warden/validator.json
    {
      "pubkey": {"#pubkey"},
      "amount": "1000000000000000000award",
      "moniker": "",
      "identity": "",
      "website": "",
      "security": "",
      "details": "",
      "commission-rate": "0.05",
      "commission-max-rate": "0.2",
      "commission-max-change-rate": "0.2",
      "min-self-delegation": "1"
    }
    wardend tx staking create-validator $HOME/.warden/validator.json \
        --from=wallet \
        --chain-id=chiado_10010-1 \
        --gas auto --gas-adjustment 1.6 \
        --fees 250000000000000award

    Unjail Validator

    wardend tx slashing unjail --from Wallet --chain-id chiado_10010-1  --gas auto --gas-adjustment 1.6 --fees 250000000000000award

    Check Jailed Reason

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

    Token Management

    Withdraw Rewards

    wardend tx distribution withdraw-all-rewards --from Wallet --chain-id chiado_10010-1  --gas auto --gas-adjustment 1.6 --fees 250000000000000award

    Withdraw Rewards with Comission

    wardend tx distribution withdraw-rewards $(wardend keys show wallet --bech val -a) --commission --from wallet --chain-id chiado_10010-1  --gas auto --gas-adjustment 1.6 --fees 250000000000000award

    Delegate Token to your own validator

    wardend tx staking delegate $(wardend keys show wallet --bech val -a) 1000000000000000000award --from wallet --chain-id chiado_10010-1  --gas auto --gas-adjustment 1.6 --fees 250000000000000award

    Delegate Token to other validator

    wardend staking redelegate $(wardend keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000000000000000award --from wallet --chain-id chiado_10010-1  --gas auto --gas-adjustment 1.6 --fees 250000000000000award

    Unbond Token from your validator

    wardend tx staking unbond $(wardend keys show wallet --bech val -a) 1000000000000000000award --from wallet --chain-id chiado_10010-1  --gas auto --gas-adjustment 1.6 --fees 250000000000000award

    Send Token to another wallet

    wardend tx bank send wallet <TO_WALLET_ADDRESS> 1000000000000000000award --from wallet --chain-id chiado_10010-1  --gas auto --gas-adjustment 1.6 --fees 250000000000000award

    Other

    Set Your own Custom Ports You can change value CUSTOM_PORT=20 To any other ports

    sed -i.bak -e  "s%^node = \"tcp://localhost:26657\"%node = \"tcp://localhost:24657\"%" $HOME/.warden/config/client.toml
    sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:24658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:24657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:24060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:24656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":24660\"%" $HOME/.warden/config/config.toml
    sed -i.bak -e "s%^address = \"tcp://localhost:1317\"%address = \"tcp://localhost:24317\"%; s%^address = \"localhost:9090\"%address = \"localhost:24090\"%" $HOME/.warden/config/app.toml

    Enable Indexing usually enabled by default

    sed -i 's|^indexer *=.*|indexer = "kv"|' $HOME/.warden/config/config.toml

    Disable Indexing

    sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.warden/config/config.toml

    Reset Chain Data

    wardend tendermint unsafe-reset-all --home $HOME/.warden --keep-addr-book

    Delete Node

    WARNING! Use this command wisely Backup your key first it will remove Defund from your system

    sudo systemctl stop wardend
    sudo systemctl disable wardend
    sudo rm /etc/systemd/system/wardend.service
    sudo systemctl daemon-reload
    rm -f $(which wardend)
    rm -rf .warden
    rm -rf wardenprotol