pub trait XykFunctionsTrait<AccountId, Balance, CurrencyId> {
Show 13 methods // Required methods fn create_pool( sender: AccountId, first_asset_id: CurrencyId, first_asset_amount: Balance, second_asset_id: CurrencyId, second_asset_amount: Balance ) -> DispatchResult; fn sell_asset( sender: AccountId, sold_asset_id: CurrencyId, bought_asset_id: CurrencyId, sold_asset_amount: Balance, min_amount_out: Balance, err_upon_bad_slippage: bool ) -> Result<Balance, DispatchError>; fn multiswap_sell_asset( sender: AccountId, swap_token_list: Vec<CurrencyId>, sold_asset_amount: Balance, min_amount_out: Balance, err_upon_bad_slippage: bool, err_upon_non_slippage_fail: bool ) -> Result<Balance, DispatchError>; fn do_multiswap_sell_asset( sender: AccountId, swap_token_list: Vec<CurrencyId>, sold_asset_amount: Balance, min_amount_out: Balance ) -> Result<Balance, DispatchError>; fn do_multiswap_buy_asset( sender: AccountId, swap_token_list: Vec<CurrencyId>, bought_asset_amount: Balance, max_amount_in: Balance ) -> Result<Balance, DispatchError>; fn buy_asset( sender: AccountId, sold_asset_id: CurrencyId, bought_asset_id: CurrencyId, bought_asset_amount: Balance, max_amount_in: Balance, err_upon_bad_slippage: bool ) -> Result<Balance, DispatchError>; fn multiswap_buy_asset( sender: AccountId, swap_token_list: Vec<CurrencyId>, bought_asset_amount: Balance, max_amount_in: Balance, err_upon_bad_slippage: bool, err_upon_non_slippage_fail: bool ) -> Result<Balance, DispatchError>; fn mint_liquidity( sender: AccountId, first_asset_id: CurrencyId, second_asset_id: CurrencyId, first_asset_amount: Balance, expected_second_asset_amount: Balance, activate_minted_liquidity: bool ) -> Result<(CurrencyId, Balance), DispatchError>; fn provide_liquidity_with_conversion( sender: AccountId, first_asset_id: CurrencyId, second_asset_id: CurrencyId, provided_asset_id: CurrencyId, provided_asset_amount: Balance, activate_minted_liquidity: bool ) -> Result<(CurrencyId, Balance), DispatchError>; fn burn_liquidity( sender: AccountId, first_asset_id: CurrencyId, second_asset_id: CurrencyId, liquidity_asset_amount: Balance ) -> DispatchResult; fn get_tokens_required_for_minting( liquidity_asset_id: CurrencyId, liquidity_token_amount: Balance ) -> Result<(CurrencyId, Balance, CurrencyId, Balance), DispatchError>; fn do_compound_rewards( sender: AccountId, liquidity_asset_id: CurrencyId, amount_permille: Permill ) -> DispatchResult; fn is_liquidity_token(liquidity_asset_id: CurrencyId) -> bool;
}

Required Methods§

source

fn create_pool( sender: AccountId, first_asset_id: CurrencyId, first_asset_amount: Balance, second_asset_id: CurrencyId, second_asset_amount: Balance ) -> DispatchResult

source

fn sell_asset( sender: AccountId, sold_asset_id: CurrencyId, bought_asset_id: CurrencyId, sold_asset_amount: Balance, min_amount_out: Balance, err_upon_bad_slippage: bool ) -> Result<Balance, DispatchError>

source

fn multiswap_sell_asset( sender: AccountId, swap_token_list: Vec<CurrencyId>, sold_asset_amount: Balance, min_amount_out: Balance, err_upon_bad_slippage: bool, err_upon_non_slippage_fail: bool ) -> Result<Balance, DispatchError>

source

fn do_multiswap_sell_asset( sender: AccountId, swap_token_list: Vec<CurrencyId>, sold_asset_amount: Balance, min_amount_out: Balance ) -> Result<Balance, DispatchError>

source

fn do_multiswap_buy_asset( sender: AccountId, swap_token_list: Vec<CurrencyId>, bought_asset_amount: Balance, max_amount_in: Balance ) -> Result<Balance, DispatchError>

source

fn buy_asset( sender: AccountId, sold_asset_id: CurrencyId, bought_asset_id: CurrencyId, bought_asset_amount: Balance, max_amount_in: Balance, err_upon_bad_slippage: bool ) -> Result<Balance, DispatchError>

source

fn multiswap_buy_asset( sender: AccountId, swap_token_list: Vec<CurrencyId>, bought_asset_amount: Balance, max_amount_in: Balance, err_upon_bad_slippage: bool, err_upon_non_slippage_fail: bool ) -> Result<Balance, DispatchError>

source

fn mint_liquidity( sender: AccountId, first_asset_id: CurrencyId, second_asset_id: CurrencyId, first_asset_amount: Balance, expected_second_asset_amount: Balance, activate_minted_liquidity: bool ) -> Result<(CurrencyId, Balance), DispatchError>

source

fn provide_liquidity_with_conversion( sender: AccountId, first_asset_id: CurrencyId, second_asset_id: CurrencyId, provided_asset_id: CurrencyId, provided_asset_amount: Balance, activate_minted_liquidity: bool ) -> Result<(CurrencyId, Balance), DispatchError>

source

fn burn_liquidity( sender: AccountId, first_asset_id: CurrencyId, second_asset_id: CurrencyId, liquidity_asset_amount: Balance ) -> DispatchResult

source

fn get_tokens_required_for_minting( liquidity_asset_id: CurrencyId, liquidity_token_amount: Balance ) -> Result<(CurrencyId, Balance, CurrencyId, Balance), DispatchError>

source

fn do_compound_rewards( sender: AccountId, liquidity_asset_id: CurrencyId, amount_permille: Permill ) -> DispatchResult

source

fn is_liquidity_token(liquidity_asset_id: CurrencyId) -> bool

Implementors§