pub trait DexInfoProvider<DEXId, DEXInfo>where
    DEXId: Eq + PartialEq<DEXId> + Copy + Clone + PartialOrd<DEXId> + Ord,
    DEXInfo: Clone + PartialEq<DEXInfo> + Eq + Default,{
    // Required methods
    fn get_dex_info(dex_id: &DEXId) -> Result<DEXInfo, DispatchError>;
    fn ensure_dex_exists(dex_id: &DEXId) -> Result<(), DispatchError>;
    fn list_dex_ids() -> Vec<DEXId, Global> ;
}
Expand description

Trait to provide DEXInfo

Required Methods§

source

fn get_dex_info(dex_id: &DEXId) -> Result<DEXInfo, DispatchError>

source

fn ensure_dex_exists(dex_id: &DEXId) -> Result<(), DispatchError>

source

fn list_dex_ids() -> Vec<DEXId, Global>

Implementations on Foreign Types§

source§

impl<DEXId, DEXInfo> DexInfoProvider<DEXId, DEXInfo> for ()where DEXId: Eq + PartialEq<DEXId> + Copy + Clone + PartialOrd<DEXId> + Ord, DEXInfo: Clone + PartialEq<DEXInfo> + Eq + Default,

source§

fn get_dex_info(_dex_id: &DEXId) -> Result<DEXInfo, DispatchError>

source§

fn ensure_dex_exists(_dex_id: &DEXId) -> Result<(), DispatchError>

source§

fn list_dex_ids() -> Vec<DEXId, Global>

source§

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

source§

fn get_dex_info( dex_id: &<T as Config>::DEXId ) -> Result<DEXInfo<<T as Config>::AssetId>, DispatchError>

source§

fn ensure_dex_exists(dex_id: &<T as Config>::DEXId) -> Result<(), DispatchError>

source§

fn list_dex_ids() -> Vec<<T as Config>::DEXId, Global>

Implementors§