|
| 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 /> |
0 commit comments