Type alias Config

Config: {
    assetIdToTickerMap: {
        [assetId: number]: string;
    };
    assets: {
        [assetTicker: string]: [{
            id: string;
            priceSource: string;
        }];
    };
    attestations: {
        enableAttestations: boolean;
        ethereum: {
            attestationVerifierAddress: string | undefined;
            name: string | undefined;
            privateKey: string | undefined;
            rpc: string;
        };
    };
    bidding: BiddingStrategy;
    circuit: Circuit;
    gateways: Gateway[];
    name: string;
    pricing: {
        [source: string]: {
            endpoint: string;
            endpointDefaults: string;
            frequency: number;
        };
    };
    strategies: {
        [targetId: string]: Strategy;
    };
    vendors: string[];
}

The configuration for the executor.

Example Configuration:

export const config: Config = {
circuit: {
rpc: "ws://127.0.0.1::9944",
ticker: "TRN",
decimals: 12,
},
gateways: [
{
name: "Rococo",
id: "roco",
rpc: "wss://rococo-rpc.polkadot.io",
type: "Substrate",
},
{
name: "Basilisk",
id: "bslk",
rpc: "wss://rococo-basilisk-rpc.hydration.dev",
type: "Substrate",
nativeId: 2090,
},
],
pricing: {
coingecko: {
endpoint: "https://api.coingecko.com/api/v3/coins/",
},
},
assets: {
BSX: [
{
priceSource: "coingecko",
id: "basilisk",
},
],
ROC: [
{
priceSource: "coingecko",
id: "polkadot",
},
],
TRN: [
{
priceSource: "coingecko",
id: "tether",
},
],
},
strategies: {
roco: {
supportedAssets: ["ROC"],
sfx: {
minProfitUsd: 3,
minYield: 0.05,
},
xtx: {
minInsuranceAmountUsd: 1,
minInsuranceShare: 0.1,
},
},
},
}

Type declaration

  • assetIdToTickerMap: {
        [assetId: number]: string;
    }
    • [assetId: number]: string
  • assets: {
        [assetTicker: string]: [{
            id: string;
            priceSource: string;
        }];
    }

    Assets prices that should be tracked

    • [assetTicker: string]: [{
          id: string;
          priceSource: string;
      }]
  • attestations: {
        enableAttestations: boolean;
        ethereum: {
            attestationVerifierAddress: string | undefined;
            name: string | undefined;
            privateKey: string | undefined;
            rpc: string;
        };
    }

    Configuration for ethereum

    • enableAttestations: boolean
    • ethereum: {
          attestationVerifierAddress: string | undefined;
          name: string | undefined;
          privateKey: string | undefined;
          rpc: string;
      }
      • attestationVerifierAddress: string | undefined
      • name: string | undefined
      • privateKey: string | undefined
      • rpc: string
  • bidding: BiddingStrategy

    Parameters for tunning the behavior in the bidding stage

  • circuit: Circuit
  • gateways: Gateway[]

    The gateways that are being tracked

  • name: string
  • pricing: {
        [source: string]: {
            endpoint: string;
            endpointDefaults: string;
            frequency: number;
        };
    }

    The price sources that are being used

    • [source: string]: {
          endpoint: string;
          endpointDefaults: string;
          frequency: number;
      }
      • endpoint: string
      • endpointDefaults: string
      • frequency: number
  • strategies: {
        [targetId: string]: Strategy;
    }

    The strategies that are being used for each gateway

  • vendors: string[]

Generated using TypeDoc