Skip to content

Commit 154042d

Browse files
committed
feat(docs): add infrastructure guide and restart docker instructions
fix(docs): fix correct order for telegram bot notifications
1 parent f69d62f commit 154042d

File tree

4 files changed

+89
-8
lines changed

4 files changed

+89
-8
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ authors: [fassko]
88
keywords: [fassets, xrp, btc, doge flare-network, flare-network]
99
---
1010

11+
import RestartDocker from "./_restart_docker.mdx";
12+
1113
The FAssets system by Flare enables non-smart contract tokens like BTC and XRP to interact trustlessly with smart contracts on the Flare network, unlocking their use in DeFi applications. It achieves this through collateralized minting, utilizing [Flare Data Connector (FDC)](/fdc/overview) and [Flare Time Series Oracle (FTSO)](/ftso/overview) for secure cross-chain functionality.
1214

1315
Agents in the FAssets system facilitate the minting and redemption of FAssets by providing over-collateralized assets and managing transactions securely. A liquidator in the FAssets system monitors agent's collateralization levels to ensure the system's security and trustlessness.
@@ -227,13 +229,7 @@ docker compose --profile cli run user-bot info --fasset FASSET
227229

228230
To restart and update the FAssets agent, run the following commands:
229231

230-
```bash
231-
docker compose down
232-
git pull
233-
docker compose pull
234-
docker compose --profile cli run agent-bot listAgents --fasset FXRP
235-
docker compose up -d
236-
```
232+
<RestartDocker />
237233

238234
## Access the Agent Frontend
239235

docs/fassets/guides/7-telegram-bot-notifications.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 6
2+
sidebar_position: 7
33
slug: telegram-bot-notifications
44
title: Telegram Bot Notifications
55
description: Set up a Telegram bot to receive notifications
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
sidebar_position: 8
3+
slug: infrastructure
4+
title: FAssets Agent Infrastructure
5+
description: Configuring the FAsset Bot to Use Custom Infrastructure
6+
tags: [intermediate, fassets, bitcoin, dogecoin]
7+
authors: [fassko]
8+
keywords: [fassets, xrp, btc, doge flare-network, flare-network]
9+
---
10+
11+
import RestartDocker from "./_restart_docker.mdx";
12+
13+
By default, the FAsset bot operates on Flare infrastructure.
14+
This guide explains how to configure it to utilize your own infrastructure for enhanced performance and reliability.
15+
16+
## Prerequisites
17+
18+
- Running an RPC node https://dev.flare.network/run-node/rpc-node
19+
- Configure FTSO data provider https://dev.flare.network/run-node/ftso-data-provider
20+
- Configuring FDC attestation provider https://dev.flare.network/run-node/fdc-attestation-provider
21+
- Setting up DAL https://github.com/flare-foundation/data-availability
22+
23+
## Setting Up
24+
25+
1. Update `config.json`
26+
27+
Update the `config.json` file to include your own URLs for the data access layer, RPC, and verifier.
28+
29+
Replace the following URLs with your own:
30+
31+
- Substitute the Data Availability Layer URL with the URL for your Data Access Layer.
32+
- Update the Songbird RPC URL with your RPC endpoint.
33+
- Replace your verifier URL with your verifier endpoint.
34+
35+
```json
36+
{
37+
"dataAccessLayerUrls": [
38+
"Data Availability Layer URL",
39+
"https://sgb-data-availability.flare.network"
40+
],
41+
"rpcUrl": "Songbird RPC URL",
42+
"fAssets": {
43+
"FXRP": {
44+
"indexerUrls": [
45+
"Verifier URL",
46+
"https://fdc-verifiers-mainnet.flare.network/verifier/xrp"
47+
]
48+
}
49+
}
50+
}
51+
```
52+
53+
2. Update `secrets.json`
54+
55+
Ensure your API keys are correctly set in the `secrets.json` file:
56+
57+
```json
58+
{
59+
"indexer": ["Your API key", "Flare API key"],
60+
"data_access_layer": ["Your API key", "Flare API key"],
61+
"native_rpc": "your Songbird API key"
62+
}
63+
```
64+
65+
Replace the following: - Substitute your API key with your own custom API key(s) for indexers and data access layers. - Replace your Songbird API key with your RPC API key.
66+
67+
:::warning
68+
69+
The API keys must align with the corresponding URLs in dataAccessLayerUrls and indexerUrls. For example, the first API key in indexer should match the first verifier URL in indexerUrls.
70+
71+
Currently, only a single RPC URL is supported.
72+
Multiple RPC URLs are not supported yet.
73+
74+
3. Restart Docker Containers
75+
76+
After updating the configuration files, make sure to restart the Docker containers to apply the changes.
77+
78+
<RestartDocker />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```bash
2+
docker compose down
3+
git pull
4+
docker compose pull
5+
docker compose --profile cli run agent-bot listAgents --fasset FXRP
6+
docker compose up -d
7+
```

0 commit comments

Comments
 (0)