pub trait ExportDexGeneral<AccountId, AssetId> {
    // Required methods
    fn get_amount_in_by_path(
        amount_out: AssetBalance,
        path: &[AssetId]
    ) -> Result<Vec<AssetBalance>, DispatchError>;
    fn get_amount_out_by_path(
        amount_in: AssetBalance,
        path: &[AssetId]
    ) -> Result<Vec<AssetBalance>, DispatchError>;
    fn inner_swap_assets_for_exact_assets(
        who: &AccountId,
        amount_out: AssetBalance,
        amount_in_max: AssetBalance,
        path: &[AssetId],
        recipient: &AccountId
    ) -> DispatchResult;
    fn inner_swap_exact_assets_for_assets(
        who: &AccountId,
        amount_in: AssetBalance,
        amount_out_min: AssetBalance,
        path: &[AssetId],
        recipient: &AccountId
    ) -> DispatchResult;
    fn inner_add_liquidity(
        who: &AccountId,
        asset_0: AssetId,
        asset_1: AssetId,
        amount_0_desired: AssetBalance,
        amount_1_desired: AssetBalance,
        amount_0_min: AssetBalance,
        amount_1_min: AssetBalance
    ) -> DispatchResult;
    fn inner_remove_liquidity(
        who: &AccountId,
        asset_0: AssetId,
        asset_1: AssetId,
        remove_liquidity: AssetBalance,
        amount_0_min: AssetBalance,
        amount_1_min: AssetBalance,
        recipient: &AccountId
    ) -> DispatchResult;
}

Required Methods§

source

fn get_amount_in_by_path( amount_out: AssetBalance, path: &[AssetId] ) -> Result<Vec<AssetBalance>, DispatchError>

source

fn get_amount_out_by_path( amount_in: AssetBalance, path: &[AssetId] ) -> Result<Vec<AssetBalance>, DispatchError>

source

fn inner_swap_assets_for_exact_assets( who: &AccountId, amount_out: AssetBalance, amount_in_max: AssetBalance, path: &[AssetId], recipient: &AccountId ) -> DispatchResult

source

fn inner_swap_exact_assets_for_assets( who: &AccountId, amount_in: AssetBalance, amount_out_min: AssetBalance, path: &[AssetId], recipient: &AccountId ) -> DispatchResult

source

fn inner_add_liquidity( who: &AccountId, asset_0: AssetId, asset_1: AssetId, amount_0_desired: AssetBalance, amount_1_desired: AssetBalance, amount_0_min: AssetBalance, amount_1_min: AssetBalance ) -> DispatchResult

source

fn inner_remove_liquidity( who: &AccountId, asset_0: AssetId, asset_1: AssetId, remove_liquidity: AssetBalance, amount_0_min: AssetBalance, amount_1_min: AssetBalance, recipient: &AccountId ) -> DispatchResult

Implementations on Foreign Types§

source§

impl<AccountId, AssetId> ExportDexGeneral<AccountId, AssetId> for ()

source§

fn get_amount_in_by_path( _amount_out: AssetBalance, _path: &[AssetId] ) -> Result<Vec<AssetBalance>, DispatchError>

source§

fn get_amount_out_by_path( _amount_in: AssetBalance, _path: &[AssetId] ) -> Result<Vec<AssetBalance>, DispatchError>

source§

fn inner_swap_assets_for_exact_assets( _who: &AccountId, _amount_out: AssetBalance, _amount_in_max: AssetBalance, _path: &[AssetId], _recipient: &AccountId ) -> DispatchResult

source§

fn inner_swap_exact_assets_for_assets( _who: &AccountId, _amount_in: AssetBalance, _amount_out_min: AssetBalance, _path: &[AssetId], _recipient: &AccountId ) -> DispatchResult

source§

fn inner_add_liquidity( _who: &AccountId, _asset_0: AssetId, _asset_1: AssetId, _amount_0_desired: AssetBalance, _amount_1_desired: AssetBalance, _amount_0_min: AssetBalance, _amount_1_min: AssetBalance ) -> DispatchResult

source§

fn inner_remove_liquidity( _who: &AccountId, _asset_0: AssetId, _asset_1: AssetId, _remove_liquidity: AssetBalance, _amount_0_min: AssetBalance, _amount_1_min: AssetBalance, _recipient: &AccountId ) -> DispatchResult

Implementors§

source§

impl<T: Config> ExportDexGeneral<<T as Config>::AccountId, <T as Config>::AssetId> for Pallet<T>