Function getBasicFee

  • Retrieves the basic fee for a given domainId and asset.

    Example

    // Assuming the api instance is already connected and ready to use
    const domainId = 1;
    const xcmMultiAssetId = {...} // XCM MultiAsset ID of the asset
    getBasicFee(api, domainId, xcmMultiAssetId)
    .then((basicFee) => {
    if (basicFee.isSome()) {
    console.log('Basic fee:', basicFee.unwrap().toString());
    } else {
    console.log('Basic fee not found');
    }
    })
    .catch((error) => {
    console.error('Error fetching basic fee:', error);
    });

    Returns

    A promise that resolves to an Option containing the basic fee as u128, or None if not found.

    Parameters

    • api: ApiPromise

      The Substrate API instance.

    • domainId: number

      The ID of the domain.

    • xcmMultiAssetId: Object

      The XCM MultiAsset ID of the asset. More details

    Returns Promise<Option<u128>>

Generated using TypeDoc