Skip to main content

FAssets Agent Infrastructure

By default, the FAsset bot operates on Flare infrastructure. This guide explains how to configure it to utilize your own infrastructure for enhanced performance and reliability.

Prerequisites

Setting Up

  1. Update config.json

    Update the config.json file to include your own URLs for the data access layer, RPC, and verifier.

    Replace the following URLs with your own:

    • Substitute the Data Availability Layer URL with the URL for your Data Access Layer.
    • Update the Songbird RPC URL with your RPC endpoint.
    • Replace your verifier URL with your verifier endpoint both for FXRP and FDOGE.
    {
    "dataAccessLayerUrls": [
    "Data Availability Layer URL",
    "https://sgb-data-availability.flare.network"
    ],
    "rpcUrl": "Songbird RPC URL",
    "fAssets": {
    "FXRP": {
    "indexerUrls": [
    "Verifier URL",
    "https://fdc-verifiers-mainnet.flare.network/verifier/xrp"
    ]
    },
    "FDOGE": {
    "indexerUrls": [
    "Verifier URL",
    "https://fdc-verifiers-mainnet.flare.network/verifier/doge"
    ]
    }
    }
    }
  2. Update secrets.json

    Ensure your API keys are correctly set in the secrets.json file:

    {
    "indexer": ["Your API key", "Flare API key"],
    "data_access_layer": ["Your API key", "Flare API key"],
    "native_rpc": "your Songbird API key"
    }

    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.

    warning

    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.

    Currently, only a single RPC URL is supported. Multiple RPC URLs are not supported yet.

  3. Restart Docker Containers

    To restart and update the FAssets agent, execute the following commands, replacing FASSET with the name of the FAsset (FXRP, FDOGE, or FBTC):

    docker compose down
    git pull
    docker compose pull
    docker compose --profile cli run agent-bot listAgents --fasset FASSET
    docker compose up -d