pub trait TradingPairAPI<Block: BlockT, DEXId, TradingPair, AssetId, LiquiditySourceType>: Core<Block>where
    DEXId: Codec,
    TradingPair: Codec,
    AssetId: Codec,
    LiquiditySourceType: Codec,{
    // Provided methods
    fn list_enabled_pairs(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        dex_id: DEXId
    ) -> Result<Vec<TradingPair>, ApiError> { ... }
    fn list_enabled_pairs_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        dex_id: DEXId
    ) -> Result<Vec<TradingPair>, ApiError> { ... }
    fn is_pair_enabled(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        dex_id: DEXId,
        base_asset_id: AssetId,
        target_asset_id: AssetId
    ) -> Result<bool, ApiError> { ... }
    fn is_pair_enabled_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        dex_id: DEXId,
        base_asset_id: AssetId,
        target_asset_id: AssetId
    ) -> Result<bool, ApiError> { ... }
    fn list_enabled_sources_for_pair(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        dex_id: DEXId,
        base_asset_id: AssetId,
        target_asset_id: AssetId
    ) -> Result<Vec<LiquiditySourceType>, ApiError> { ... }
    fn list_enabled_sources_for_pair_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        dex_id: DEXId,
        base_asset_id: AssetId,
        target_asset_id: AssetId
    ) -> Result<Vec<LiquiditySourceType>, ApiError> { ... }
    fn is_source_enabled_for_pair(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        dex_id: DEXId,
        base_asset_id: AssetId,
        target_asset_id: AssetId,
        source_type: LiquiditySourceType
    ) -> Result<bool, ApiError> { ... }
    fn is_source_enabled_for_pair_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        dex_id: DEXId,
        base_asset_id: AssetId,
        target_asset_id: AssetId,
        source_type: LiquiditySourceType
    ) -> Result<bool, ApiError> { ... }
}

Provided Methods§

source

fn list_enabled_pairs( &self, __runtime_api_at_param__: &BlockId<Block>, dex_id: DEXId ) -> Result<Vec<TradingPair>, ApiError>

source

fn list_enabled_pairs_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, dex_id: DEXId ) -> Result<Vec<TradingPair>, ApiError>

source

fn is_pair_enabled( &self, __runtime_api_at_param__: &BlockId<Block>, dex_id: DEXId, base_asset_id: AssetId, target_asset_id: AssetId ) -> Result<bool, ApiError>

source

fn is_pair_enabled_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, dex_id: DEXId, base_asset_id: AssetId, target_asset_id: AssetId ) -> Result<bool, ApiError>

source

fn list_enabled_sources_for_pair( &self, __runtime_api_at_param__: &BlockId<Block>, dex_id: DEXId, base_asset_id: AssetId, target_asset_id: AssetId ) -> Result<Vec<LiquiditySourceType>, ApiError>

source

fn list_enabled_sources_for_pair_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, dex_id: DEXId, base_asset_id: AssetId, target_asset_id: AssetId ) -> Result<Vec<LiquiditySourceType>, ApiError>

source

fn is_source_enabled_for_pair( &self, __runtime_api_at_param__: &BlockId<Block>, dex_id: DEXId, base_asset_id: AssetId, target_asset_id: AssetId, source_type: LiquiditySourceType ) -> Result<bool, ApiError>

source

fn is_source_enabled_for_pair_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, dex_id: DEXId, base_asset_id: AssetId, target_asset_id: AssetId, source_type: LiquiditySourceType ) -> Result<bool, ApiError>

Trait Implementations§

source§

impl<Block: BlockT, DEXId, TradingPair, AssetId, LiquiditySourceType> RuntimeApiInfo for dyn TradingPairAPI<Block, DEXId, TradingPair, AssetId, LiquiditySourceType>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§