referrerpolicy=no-referrer-when-downgrade

Trait staging_xcm_builder::test_utils::AssetExchange

pub trait AssetExchange {
    // Required methods
    fn exchange_asset(
        origin: Option<&Location>,
        give: AssetsInHolding,
        want: &Assets,
        maximal: bool,
    ) -> Result<AssetsInHolding, AssetsInHolding>;
    fn quote_exchange_price(
        _give: &Assets,
        _want: &Assets,
        _maximal: bool,
    ) -> Option<Assets>;
}
Expand description

A service for exchanging assets.

Required Methods§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Handler for exchanging an asset.

  • origin: The location attempting the exchange; this should generally not matter.
  • give: The assets which have been removed from the caller.
  • want: The minimum amount of assets which should be given to the caller in case any exchange happens. If more assets are provided, then they should generally be of the same asset class if at all possible.
  • maximal: If true, then as much as possible should be exchanged.

Ok is returned along with the new set of assets which have been exchanged for give. At least want must be in the set. Some assets originally in give may also be in this set. In the case of returning an Err, then give is returned.

fn quote_exchange_price( _give: &Assets, _want: &Assets, _maximal: bool, ) -> Option<Assets>

Handler for quoting the exchange price of two asset collections.

It’s useful before calling exchange_asset, to get some information on whether or not the exchange will be successful.

Arguments:

  • give The asset(s) that are going to be given.
  • want The asset(s) that are wanted.
  • maximal: - If true, then the return value is the resulting amount of want obtained by swapping give.
    • If false, then the return value is the required amount of give needed to get want.

The return value is Assets since it comprises both which assets and how much of them.

The relationship between this function and exchange_asset is the following:

  • quote(give, want, maximal) = resulting_want -> exchange(give, resulting_want, maximal) ✅
  • quote(give, want, minimal) = required_give -> exchange(required_give_amount, want, minimal) ✅

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl AssetExchange for ()

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0> AssetExchange for (TupleElement0,)
where TupleElement0: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1> AssetExchange for (TupleElement0, TupleElement1)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2> AssetExchange for (TupleElement0, TupleElement1, TupleElement2)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange, TupleElement26: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26, TupleElement27> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26, TupleElement27)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange, TupleElement26: AssetExchange, TupleElement27: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26, TupleElement27, TupleElement28> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26, TupleElement27, TupleElement28)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange, TupleElement26: AssetExchange, TupleElement27: AssetExchange, TupleElement28: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

§

impl<TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26, TupleElement27, TupleElement28, TupleElement29> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26, TupleElement27, TupleElement28, TupleElement29)
where TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange, TupleElement26: AssetExchange, TupleElement27: AssetExchange, TupleElement28: AssetExchange, TupleElement29: AssetExchange,

§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Implementors§

source§

impl AssetExchange for TestAssetExchanger

source§

impl<AssetConversion, Fungibles, Matcher, AccountId> AssetExchange for SingleAssetExchangeAdapter<AssetConversion, Fungibles, Matcher, AccountId>
where AssetConversion: SwapCredit<AccountId, Balance = u128, AssetKind = Fungibles::AssetId, Credit = Credit<AccountId, Fungibles>> + QuotePrice<Balance = u128, AssetKind = Fungibles::AssetId>, Fungibles: Balanced<AccountId, Balance = u128>, Matcher: MatchesFungibles<Fungibles::AssetId, Fungibles::Balance>,