Skip to content

Commit

Permalink
fix(docs): update FAssets Agent CLI instructions to use docker-compos…
Browse files Browse the repository at this point in the history
…e commands
  • Loading branch information
fassko committed Dec 13, 2024
1 parent f6589e1 commit 407b10e
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions docs/fassets/guides/3-create-fasset-agent-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ authors: [fassko]
keywords: [fassets, xrp, btc, doge flare-network, flare-network]
---

The FAssets Bots Command Line Interface (CLI) is designed to provide a way to create and manage FAssets agent bots using the command line. It allows users to monitor the agent bot and create and manage FAssets agent vaults.
The FAssets Bots Command Line Interface (CLI) allows you to create and manage FAssets agent bots and user tools directly from the command line. It also allows you to monitor the agent bot, create FAssets agent vaults, and interact with the FAssets system efficiently.

You can access the FAssets Agent CLI after you follow the guide on how to [set up the FAssets agent](/fassets/guides/deploy-fassets-agent).
After you start the Docker services, access the command line of the FAssets agent running the following command:

```bash
docker compose exec app bash
```
:::info
Learn how to use the FAssets Agent CLI as [Docker service](/fassets/guides/deploy-fassets-agent#execute-fasset-bot-commands).
:::

### Configure the Agent

Expand All @@ -24,7 +23,7 @@ You need to set up your agent's parameters like name, collateral, and fund with
1. Prepare the agent settings `tmp.agent-settings.json` exchanging `FASSET` with `FXRP`, `FBTC` or `FDOGE` according to which underlying network you want to work on:

```console
yarn agent-bot --fasset FASSET create --prepare
docker-compose --profile cli run agent-bot --fasset FASSET create --prepare
```

2. Choose a suffix for your agent's collateral pool and fill in the `poolTokenSuffix` field in the `tmp.agent-settings.json`.
Expand All @@ -40,7 +39,7 @@ You need to set up your agent's parameters like name, collateral, and fund with
Exchange `FASSET` with `FXRP`, `FBTC` or `FDOGE` according to which underlying network you are creating the agent.

```console
yarn agent-bot --fasset FASSET create tmp.agent-settings.json
docker-compose --profile cli run agent-bot --fasset FASSET create tmp.agent-settings.json
```

### Deposit Collateral
Expand All @@ -55,21 +54,21 @@ You have two options: either deposit the vault collateral and buy pool collatera
To deposit both vault and pool collateral together and let the tool calculate the minimum required collateral to back the lots, you can use the `depositCollateral` function to the agent, specifying your created agent address in the `AGENT_ADDRESS` and lot size in the `LOTS`, as well exchange `FASSET` with `FXRP`, `FBTC` or `FDOGE` according to which underlying network you are creating the agent:

```console
yarn agent-bot depositCollaterals AGENT_ADDRESS LOTS --fasset FASSET
docker-compose --profile cli run agent-bot depositCollaterals AGENT_ADDRESS LOTS --fasset FASSET
```

#### Deposit Collateral Separately

1. Deposit enough vault collateral to the agent specifying your created agent address in the `AGENT_ADDRESS` and the amount of the stablecoin or wrapped ETH in the `AMOUNT` field, as well exchange `FASSET` with `FXRP`, `FBTC` or `FDOGE` according to which underlying network you are creating the agent.

```console
yarn agent-bot depositVaultCollateral AGENT_ADDRESS AMOUNT --fasset FASSET
docker-compose --profile cli run agent-bot depositVaultCollateral AGENT_ADDRESS AMOUNT --fasset FASSET
```

2. Buy enough pool collateral for the agent specifying your agent's address in the `AGENT_ADDRESS` and the amount of the CFLR in the `CFLR_AMOUNT` field, as well exchange `FASSET` with `FXRP`, `FBTC` or `FDOGE` according to which underlying network you are creating the agent.

```console
yarn agent-bot buyPoolCollateral AGENT_ADDRESS CFLR_AMOUNT --fasset FASSET
docker-compose --profile cli run agent-bot buyPoolCollateral AGENT_ADDRESS CFLR_AMOUNT --fasset FASSET
```

### Register the Agent as Available
Expand All @@ -79,13 +78,13 @@ You need to make your agent available to mint and redeem FAssets.
1. Register your agent as available to the network by executing this command replacing the `AGENT_ADDRESS` with your agent address, as well exchange `FASSET` with `FXRP`, `FBTC` or `FDOGE` according to which underlying network you are entering the agent:

```console
yarn agent-bot enter AGENT_ADDRESS --fasset FASSET
docker-compose --profile cli run agent-bot enter AGENT_ADDRESS --fasset FASSET
```

2. If you deposited enough collateral, you should see that your agent has at least one lot available by running the command replacing `FASSET` with `FXRP`, `FBTC` or `FDOGE` according to which underlying network you are running the agent.

```console
yarn user-bot agents --fasset FASSET
docker-compose --profile cli run user-bot agents --fasset FASSET
```

If you don't have available lots, check if the vault and pool collaterals are enough.
Expand Down

0 comments on commit 407b10e

Please sign in to comment.