# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export BEEZEE_CHAIN_ID="beezee-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
bzed keys add wallet

#Recover Wallet
bzed keys add wallet --recover

#List Wallet
bzed keys list

#Delete Wallet
bzed keys delete wallet

#Check Wallet Balance
bzed q bank balances $(bzed keys show wallet -a)
```

### VALIDATOR MANAGEMENT

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

```bash
#Create Validator
bzed tx staking create-validator \
--amount=1000000ubze \
--pubkey=$(bzed tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$BEEZEE_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1ubze 

#Edit Validator
bzed tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$BEEZEE_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1ubze

#Unjail Validator
bzed tx slashing unjail --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

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

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
bzed tx distribution withdraw-all-rewards --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

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

#Delegate Token to your own validator
bzed tx staking delegate $(bzed keys show wallet --bech val -a) 100000ubze --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

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

#Unbond Token from your validator
bzed tx staking unbond $(bzed keys show wallet --bech val -a) 100000ubze --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y

#Send Token to another wallet
bzed tx bank send wallet <TO_WALLET_ADDRESS> 100000ubze --from wallet --chain-id $BEEZEE_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1ubze -y
```

### GOVERNANCE

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

#List all proposals
bzed query gov proposals

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

### SERVICES MANAGEMENT

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

# Enable Service
sudo systemctl enable bzed

# Disable Service
sudo systemctl disable bzed

# Start Service
sudo systemctl start bzed

# Stop Service
sudo systemctl stop bzed

# Restart Service
sudo systemctl restart bzed

# Check Service Status
sudo systemctl status bzed

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

### UTILITY

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

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

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

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

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

#Reset Node
bzed tendermint unsafe-reset-all --home $HOME/.bze --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 bzed && sudo systemctl disable bzed && sudo rm /etc/systemd/system/bzed.service && sudo systemctl daemon-reload && sudo rm -rf $(which bzed) && rm -rf $HOME/.bze
```
