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>, 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
    ) -> DispatchResult;
    fn disable_source_for_trading_pair(
        dex_id: &DEXId,
        base_asset_id: &AssetId,
        target_asset_id: &AssetId,
        source_type: LiquiditySourceType
    ) -> DispatchResult;
}

Required Methods§

source

fn list_enabled_sources_for_trading_pair( dex_id: &DEXId, base_asset_id: &AssetId, target_asset_id: &AssetId ) -> Result<BTreeSet<LiquiditySourceType>, 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 ) -> DispatchResult

source

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

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>, 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 ) -> DispatchResult

source§

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

Implementors§