# Useful commands

## 🖊️Working with your wallet

* **Add New Key**

```
fuelsequencerd keys add wallet
```

* **Recover Existing Key**

```
fuelsequencerd keys add wallet --recover
```

* **Query Wallet Balance**

```
fuelsequencerd q bank balances $(fuelsequencerd keys show wallet -a)
```

* **List All Keys**

```
fuelsequencerd keys list
```

* **Delete Key**

```
fuelsequencerd keys delete wallet
```

* **Export Key to a File**

```
fuelsequencerd keys export wallet
```

* **Import Key from a File**

```
fuelsequencerd keys import wallet wallet.backup
```

***

## 🔧Service

* **Info**

```
fuelsequencerd status 2>&1 | jq .NodeInfo
fuelsequencerd status 2>&1 | jq .SyncInfo
fuelsequencerd status 2>&1 | jq .ValidatorInfo
```

* **Check Node Logs**

```
sudo journalctl -fu fuelsequencerd -o cat
```

* **Check Service Status**

```
sudo systemctl status fuelsequencerd
```

* **Restart Service**

```
sudo systemctl restart fuelsequencerd
```

* **Stop Service**

```
sudo systemctl stop fuelsequencerd
```

* **Start Service**

```
sudo systemctl start fuelsequencerd
```

* **Reload, Disable, Enable**

```
sudo systemctl daemon-reload
sudo systemctl disable fuelsequencerd
sudo systemctl enable fuelsequencerd
```

* **Your Peer**

```
echo $(fuelsequencerd tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.fuelsequencer/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
```

***

## 🔗Validator Management🔗

* **Create New Validator**

```
fuelsequencerd tx staking create-validator \
--amount 1000000fuel \
--from <walletName> \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(fuelsequencerd tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_DETAILS" \
--details "YOUR_WEBSITE_URL" \
--chain-id seq-mainnet-1 \
--gas auto --gas-adjustment 1.5 \
-y 

```

* **Edit Validator**

<pre><code><strong>fuelsequencerd tx staking edit-validator \
</strong>--commission-rate 0.1 \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--from &#x3C;walletName> \
--chain-id seq-mainnet-1 \
--gas auto --gas-adjustment 1.5 \
-y
</code></pre>

* **Jail Info**

```
fuelsequencerd q slashing signing-info $(fuelsequencerd tendermint show-validator) 
```

* **Unjail**

```
fuelsequencerd tx slashing unjail --from <walletName> --chain-id seq-mainnet-1 --gas auto --gas-adjustment 1.5 -y 
```

* **View Validator Details**

```
fuelsequencerd q staking validator $(fuelsequencerd keys show <walletName> --bech val -a) 
```

***

## 🔈Governance <a href="#governance" id="governance"></a>

* **List All Proposals**

```
fuelsequencerd query gov proposals 
```

* **View Specific Proposal**

```
fuelsequencerd query gov proposal 1
```

* **Vote Yes**

```
fuelsequencerd tx gov vote 1 yes --from Wallet_Name --chain-id seq-mainnet-1  --gas auto --gas-adjustment 1.5 -y 
```

* **Vote No**

```
fuelsequencerd tx gov vote 1 no --from Wallet_Name --chain-id seq-mainnet-1  --gas auto --gas-adjustment 1.5 -y 
```

* **Vote Abstain**

```
fuelsequencerd tx gov vote 1 abstain --from Wallet_Name --chain-id seq-mainnet-1  --gas auto --gas-adjustment 1.5 -y 
```

**Vote no\_with\_veto**

```
fuelsequencerd tx gov vote 1 no_with_veto --from Wallet_Name --chain-id seq-mainnet-1  --gas auto --gas-adjustment 1.5 -y
```

***

## ⚙️Token management <a href="#token-management" id="token-management"></a>

* **Withdraw all rewards from all validators:**

```
fuelsequencerd tx distribution withdraw-all-rewards --from Wallet_Name --chain-id seq-mainnet-1 --gas auto --gas-adjustment 1.5 -y
```

* **Withdraw rewards and commission from your Validator:**

```
fuelsequencerd tx distribution withdraw-rewards Your_valoper_address --from Wallet_Name --commission --chain-id seq-mainnet-1 --gas auto --gas-adjustment 1.5 -y
```

* **Delegate tokens to your validator**

```
fuelsequencerd tx staking delegate Your_valoper_address 1000000fuel --from Wallet_Name --chain-id seq-mainnet-1 --gas auto --gas-adjustment 1.5 -y
```

* **Delegate tokens to different validator**

```
fuelsequencerd tx staking delegate valoper_address 1000000fuel --from Wallet_Name --chain-id seq-mainnet-1 --gas auto --gas-adjustment 1.5 -y
```

* **Redelegate tokens to another validator**

```
fuelsequencerd tx staking redelegate Your_valoper_address TO_VALOPER_ADDRESS 1000000fuel --from Wallet_Name --chain-id seq-mainnet-1 --gas auto --gas-adjustment 1.5 -y 
```

* **Unbond tokens from your validator**

```
fuelsequencerd tx staking unbond valoper_address 1000000fuel --from Wallet_Name --chain-id seq-mainnet-1 --gas auto --gas-adjustment 1.5 -y
```

* **Send tokens to the wallet**

```
fuelsequencerd tx bank send Your_Wallet_Address To_wallet_address 1000000fuel --gas auto --gas-adjustment 1.5 -y
```

**Notes:**

* Replace `Wallet_Name` with the name of your wallet.
* Replace `Your_valoper_address` and `valoper_address` with the respective validator addresses.
* Replace `Your_wallet_address` and `recipient_wallet_address` with the respective wallet addresses.
* Ensure you have sufficient `fuel` tokens to cover the fees and the amounts you intend to send.
* The `--gas` parameter specifies the maximum gas units to use for the transaction. Adjust this value if necessary.
* The `--fees` parameter specifies the fee amount in `fuel`. Ensure you have enough tokens to cover the fees.
* The `-y` flag automatically confirms the transaction without prompting for confirmation.

For more detailed information, refer to the [Fuel documentation.](https://docs.fuel.network/docs/node-operator/)

*Please exercise caution when performing transactions and ensure you have backed up your wallet information securely.*


---

# 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://service.block-pro.net/mainnet/fuel/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.
