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> { ... }
}
The identifier of the runtime api.
The version of the runtime api.