Enum pallet_asset_conversion::pallet::Error
source · pub enum Error<T> {
Show 23 variants
InvalidAssetPair,
PoolExists,
WrongDesiredAmount,
AmountOneLessThanMinimal,
AmountTwoLessThanMinimal,
ReserveLeftLessThanMinimal,
AmountOutTooHigh,
PoolNotFound,
Overflow,
AssetOneDepositDidNotMeetMinimum,
AssetTwoDepositDidNotMeetMinimum,
AssetOneWithdrawalDidNotMeetMinimum,
AssetTwoWithdrawalDidNotMeetMinimum,
OptimalAmountLessThanDesired,
InsufficientLiquidityMinted,
ZeroLiquidity,
ZeroAmount,
ProvidedMinimumNotSufficientForSwap,
ProvidedMaximumNotSufficientForSwap,
InvalidPath,
NonUniquePath,
IncorrectPoolAssetId,
BelowMinimum,
// some variants omitted
}
Expand description
The Error
enum of this pallet.
Variants§
InvalidAssetPair
Provided asset pair is not supported for pool.
PoolExists
Pool already exists.
WrongDesiredAmount
Desired amount can’t be zero.
AmountOneLessThanMinimal
Provided amount should be greater than or equal to the existential deposit/asset’s minimal amount.
AmountTwoLessThanMinimal
Provided amount should be greater than or equal to the existential deposit/asset’s minimal amount.
ReserveLeftLessThanMinimal
Reserve needs to always be greater than or equal to the existential deposit/asset’s minimal amount.
AmountOutTooHigh
Desired amount can’t be equal to the pool reserve.
PoolNotFound
The pool doesn’t exist.
Overflow
An overflow happened.
AssetOneDepositDidNotMeetMinimum
The minimal amount requirement for the first token in the pair wasn’t met.
AssetTwoDepositDidNotMeetMinimum
The minimal amount requirement for the second token in the pair wasn’t met.
AssetOneWithdrawalDidNotMeetMinimum
The minimal amount requirement for the first token in the pair wasn’t met.
AssetTwoWithdrawalDidNotMeetMinimum
The minimal amount requirement for the second token in the pair wasn’t met.
OptimalAmountLessThanDesired
Optimal calculated amount is less than desired.
InsufficientLiquidityMinted
Insufficient liquidity minted.
ZeroLiquidity
Requested liquidity can’t be zero.
ZeroAmount
Amount can’t be zero.
ProvidedMinimumNotSufficientForSwap
Calculated amount out is less than provided minimum amount.
ProvidedMaximumNotSufficientForSwap
Provided maximum amount is not sufficient for swap.
InvalidPath
The provided path must consists of 2 assets at least.
NonUniquePath
The provided path must consists of unique assets.
IncorrectPoolAssetId
It was not possible to get or increment the Id of the pool.
BelowMinimum
The destination account cannot exist with the swapped funds.
Trait Implementations§
source§impl<T> Decode for Error<T>
impl<T> Decode for Error<T>
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
source§impl<T> Encode for Error<T>
impl<T> Encode for Error<T>
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
source§impl<T> PalletError for Error<T>
impl<T> PalletError for Error<T>
source§const MAX_ENCODED_SIZE: usize = 1usize
const MAX_ENCODED_SIZE: usize = 1usize
impl<T> EncodeLike for Error<T>
Auto Trait Implementations§
impl<T> Freeze for Error<T>
impl<T> RefUnwindSafe for Error<T>where
T: RefUnwindSafe,
impl<T> Send for Error<T>where
T: Send,
impl<T> Sync for Error<T>where
T: Sync,
impl<T> Unpin for Error<T>where
T: Unpin,
impl<T> UnwindSafe for Error<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read moresource§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.