pub trait TradingPairSourceManager<DEXId, AssetId> {
    // Required methods
    fn list_enabled_sources_for_trading_pair(
        dex_id: &DEXId,
        base_asset_id: &AssetId,
        target_asset_id: &AssetId
    ) -> Result<BTreeSet<LiquiditySourceType, Global>, DispatchError>;
    fn is_source_enabled_for_trading_pair(
        dex_id: &DEXId,
        base_asset_id: &AssetId,
        target_asset_id: &AssetId,
        source_type: LiquiditySourceType
    ) -> Result<bool, DispatchError>;
    fn enable_source_for_trading_pair(
        dex_id: &DEXId,
        base_asset_id: &AssetId,
        target_asset_id: &AssetId,
        source_type: LiquiditySourceType
    ) -> Result<(), DispatchError>;
    fn disable_source_for_trading_pair(
        dex_id: &DEXId,
        base_asset_id: &AssetId,
        target_asset_id: &AssetId,
        source_type: LiquiditySourceType
    ) -> Result<(), DispatchError>;
}

Required Methods§

source

fn list_enabled_sources_for_trading_pair( dex_id: &DEXId, base_asset_id: &AssetId, target_asset_id: &AssetId ) -> Result<BTreeSet<LiquiditySourceType, Global>, DispatchError>

source

fn is_source_enabled_for_trading_pair( dex_id: &DEXId, base_asset_id: &AssetId, target_asset_id: &AssetId, source_type: LiquiditySourceType ) -> Result<bool, DispatchError>

source

fn enable_source_for_trading_pair( dex_id: &DEXId, base_asset_id: &AssetId, target_asset_id: &AssetId, source_type: LiquiditySourceType ) -> Result<(), DispatchError>

source

fn disable_source_for_trading_pair( dex_id: &DEXId, base_asset_id: &AssetId, target_asset_id: &AssetId, source_type: LiquiditySourceType ) -> Result<(), DispatchError>

Implementations on Foreign Types§

source§

impl<DEXId, AssetId> TradingPairSourceManager<DEXId, AssetId> for ()

source§

fn list_enabled_sources_for_trading_pair( _dex_id: &DEXId, _base_asset_id: &AssetId, _target_asset_id: &AssetId ) -> Result<BTreeSet<LiquiditySourceType, Global>, DispatchError>

source§

fn is_source_enabled_for_trading_pair( _dex_id: &DEXId, _base_asset_id: &AssetId, _target_asset_id: &AssetId, _source_type: LiquiditySourceType ) -> Result<bool, DispatchError>

source§

fn enable_source_for_trading_pair( _dex_id: &DEXId, _base_asset_id: &AssetId, _target_asset_id: &AssetId, _source_type: LiquiditySourceType ) -> Result<(), DispatchError>

source§

fn disable_source_for_trading_pair( _dex_id: &DEXId, _base_asset_id: &AssetId, _target_asset_id: &AssetId, _source_type: LiquiditySourceType ) -> Result<(), DispatchError>

source§

impl<T> TradingPairSourceManager<<T as Config>::DEXId, <T as Config>::AssetId> for Pallet<T>where T: Config,

source§

fn list_enabled_sources_for_trading_pair( dex_id: &<T as Config>::DEXId, _: &<T as Config>::AssetId, _: &<T as Config>::AssetId ) -> Result<BTreeSet<LiquiditySourceType, Global>, DispatchError>

source§

fn is_source_enabled_for_trading_pair( dex_id: &<T as Config>::DEXId, base_asset_id: &<T as Config>::AssetId, target_asset_id: &<T as Config>::AssetId, source_type: LiquiditySourceType ) -> Result<bool, DispatchError>

source§

fn enable_source_for_trading_pair( dex_id: &<T as Config>::DEXId, _: &<T as Config>::AssetId, _: &<T as Config>::AssetId, source_type: LiquiditySourceType ) -> Result<(), DispatchError>

source§

fn disable_source_for_trading_pair( dex_id: &<T as Config>::DEXId, _: &<T as Config>::AssetId, _: &<T as Config>::AssetId, source_type: LiquiditySourceType ) -> Result<(), DispatchError>

Implementors§