# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export WARDEN_CHAIN_ID="chiado_10010-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Add new wallet
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

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#check pubkey 
wardend tendermint show-validator

#Make file validator.json
tee $HOME/.warden /validator.json > /dev/null << EOF
{
    "pubkey": YOUR_PUBKEY,
    "amount": "1000000000award",
    "moniker": "MONIKER",
    "identity": "YOUR_KEYBASE_ID",
    "website": "YOUR_WEBSITE_URL",
    "details": "YOUR_DETAILS.",
    "commission-rate": "0.1",
    "commission-max-rate": "0.2",
    "commission-max-change-rate": "0.01",
    "min-self-delegation": "1"
}
EOF 

#Create Validator
wardend --home $HOME/.warden tx staking create-validator $HOME/.warden/validator.json --from wallet --chain-id $WARDEN_CHAIN_ID --node https://rpc.chiado.wardenprotocol.org --gas auto --gas-adjustment 1.6 --fees 250000000000000award

#Unjail Validator
wardend tx slashing unjail --from wallet --chain-id $WARDEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1award -y

#Check Jailed Reason
wardend query slashing signing-info $(wardend tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
wardend tx distribution withdraw-all-rewards --from wallet --chain-id $WARDEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1award -y

#Withdraw Rewards with Comission
wardend tx distribution withdraw-rewards $(wardend keys show wallet --bech val -a) --commission --from wallet --chain-id $WARDEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1award -y

#Delegate Token to your own validator
wardend tx staking delegate $(wardend keys show wallet --bech val -a) 1000000award --from wallet --chain-id $WARDEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1award -y

#Delegate Token to other validator
wardend tx staking redelegate $(wardend keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000award --from wallet --chain-id $WARDEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1award -y

#Unbond Token from your validator
wardend tx staking unbond $(wardend keys show wallet --bech val -a) 1000000award --from wallet --chain-id $WARDEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1award -y

#Send Token to another wallet
wardend tx bank send wallet <TO_WALLET_ADDRESS> 1000000award --from wallet --chain-id $WARDEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1award -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
wardend tx gov vote 1 yes --from wallet --chain-id $WARDEN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1award -y

#List all proposals
wardend query gov proposals

#Create new text proposal
wardend tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000award \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=1award \ 
-y 
```

### SERVICES MANAGEMENT

```bash
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable wardend

# Disable Service
sudo systemctl disable wardend

# Start Service
sudo systemctl start wardend

# Stop Service
sudo systemctl stop wardend

# Restart Service
sudo systemctl restart wardend

# Check Service Status
sudo systemctl status wardend

# Check Service Logs
sudo journalctl -u wardend -f --no-hostname -o cat
```

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.warden/config/config.toml

#Get Validator info
wardend status 2>&1 | jq .ValidatorInfo

#Get denom info
wardend q bank denom-metadata -oj | jq

#Get sync status
wardend status 2>&1 | jq .SyncInfo.catching_up

#Get latest height
wardend status 2>&1 | jq .SyncInfo.latest_block_height

#Reset Node
wardend tendermint unsafe-reset-all --home $HOME/.warden --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop wardend && sudo systemctl disable wardend && sudo rm /etc/systemd/system/wardend.service && sudo systemctl daemon-reload && sudo rm -rf $(which wardend) && rm -rf $HOME/.warden && rm -rf $HOME/go/bin/wardend 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.syanodes.my.id/warden/useful-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
