Skip to content

Commit 5d1b6ef

Browse files
authored
Merge branch 'main' into develop
2 parents 5bac5c8 + fb99e16 commit 5d1b6ef

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

docs/fassets/guides/1-deploy-fassets-agent.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ To execute agent bot commands, use the `cli` profile with the `agent-bot` Docker
209209
For example, to get the FAssets system running agents, use this command:
210210

211211
```bash
212-
docker-compose --profile cli run agent-bot listAgents --fasset FASSET
212+
docker compose --profile cli run agent-bot listAgents --fasset FASSET
213213
```
214214

215215
Full reference for the agent bot commands can be found in the [Agent Bot CLI Reference](/fassets/reference/agent-bot).
@@ -220,7 +220,7 @@ To execute user bot commands, use the `cli` profile and the `user-bot` Docker co
220220
For example, to retrieve FAsset system info, use this command:
221221

222222
```bash
223-
docker-compose --profile cli run user-bot info --fasset FASSET
223+
docker compose --profile cli run user-bot info --fasset FASSET
224224
```
225225

226226
### Update the FAssets Agent
@@ -231,6 +231,7 @@ To restart and update the FAssets agent, run the following commands:
231231
docker compose down
232232
git pull
233233
docker compose pull
234+
docker compose --profile cli run agent-bot listAgents --fasset FXRP
234235
docker compose up -d
235236
```
236237

docs/fassets/guides/3-create-fasset-agent-cli.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You need to set up your agent's parameters like name, collateral, and fund with
2525
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:
2626

2727
```bash
28-
docker-compose --profile cli run agent-bot --fasset FASSET create --prepare
28+
docker compose --profile cli run agent-bot --fasset FASSET create --prepare
2929
```
3030

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

4343
```bash
44-
docker-compose --profile cli run agent-bot --fasset FASSET create tmp.agent-settings.json
44+
docker compose --profile cli run agent-bot --fasset FASSET create tmp.agent-settings.json
4545
```
4646

4747
### Deposit Collateral
@@ -56,21 +56,21 @@ You have two options: either deposit the vault collateral and buy pool collatera
5656
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:
5757

5858
```bash
59-
docker-compose --profile cli run agent-bot depositCollaterals AGENT_ADDRESS LOTS --fasset FASSET
59+
docker compose --profile cli run agent-bot depositCollaterals AGENT_ADDRESS LOTS --fasset FASSET
6060
```
6161

6262
#### Deposit Collateral Separately
6363

6464
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.
6565

6666
```bash
67-
docker-compose --profile cli run agent-bot depositVaultCollateral AGENT_ADDRESS AMOUNT --fasset FASSET
67+
docker compose --profile cli run agent-bot depositVaultCollateral AGENT_ADDRESS AMOUNT --fasset FASSET
6868
```
6969

7070
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.
7171

7272
```bash
73-
docker-compose --profile cli run agent-bot buyPoolCollateral AGENT_ADDRESS CFLR_AMOUNT --fasset FASSET
73+
docker compose --profile cli run agent-bot buyPoolCollateral AGENT_ADDRESS CFLR_AMOUNT --fasset FASSET
7474
```
7575

7676
### Register the Agent as Available
@@ -80,13 +80,13 @@ You need to make your agent available to mint and redeem FAssets.
8080
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:
8181

8282
```bash
83-
docker-compose --profile cli run agent-bot enter AGENT_ADDRESS --fasset FASSET
83+
docker compose --profile cli run agent-bot enter AGENT_ADDRESS --fasset FASSET
8484
```
8585

8686
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.
8787

8888
```bash
89-
docker-compose --profile cli run user-bot agents --fasset FASSET
89+
docker compose --profile cli run user-bot agents --fasset FASSET
9090
```
9191

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

docs/fassets/reference/agent-bot.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ To list all available commands:
2626
yarn agent-bot help
2727
```
2828

29-
To execute a specific command using the [Docker container](/fassets/guides/deploy-fassets-agent#execute-fasset-bot-commands) change `yarn agent-bot` with `docker-compose --profile cli run agent-bot`:
29+
To execute a specific command using the [Docker container](/fassets/guides/deploy-fassets-agent#execute-fasset-bot-commands) change `yarn agent-bot` with `docker compose --profile cli run agent-bot`:
3030

3131
```bash
32-
docker-compose --profile cli run agent-bot [command] <args> --fasset [fAssetSymbol]
32+
docker compose --profile cli run agent-bot [command] <args> --fasset [fAssetSymbol]
3333
```
3434

3535
## Owner and Agent Management

examples/developer-hub-go/flare/fetch_anchor_feeds.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,12 @@ func FetchAnchorFeeds() ([]AnchorFeed, error) {
5656
var feeds []AnchorFeed
5757
return feeds, json.Unmarshal(body, &feeds)
5858
}
59+
60+
func main() {
61+
feeds, err := FetchAnchorFeeds()
62+
if err != nil {
63+
fmt.Printf("Error: %v\n", err)
64+
return
65+
}
66+
fmt.Printf("Anchor feeds: %+v\n", feeds)
67+
}

0 commit comments

Comments
 (0)