Enum pallet_oracle::pallet::Error
source · pub enum Error<T> {
Show 42 variants
OraclePaused,
AccessDenied,
InvalidRequestId,
InvalidSwapStatus,
SwapAssetsShouldBeDifferent,
InvalidMarketMakerRequestId {
index: u8,
},
InvalidMarketMakerSwapRequestStatus,
BuySellAssetMismatch,
UnknownAsset,
SlippageOverflow,
ArithmeticError,
OfferIsLessThanSwapLowerBound {
index: u8,
},
OfferIsGreaterThanSwapUpperBound {
index: u8,
},
OfferIsLessThanMarketMakerSwapLowerBound {
index: u8,
},
OfferIsGreaterThanMarketMakerSwapUpperBound {
index: u8,
},
NoLowerBoundForBuyingPrice,
NoUpperBoundForSellingPrice,
NonMarketMakerSwap,
MarketPairNotSupported,
MarketPairAlreadySupported,
MarketPairOverflow,
MarketMakerSwapTypeIsNotLimit,
MarketMakerSwapHasNotEnoughTokenLeftToSell,
TraderSwapHasNotEnoughTokenLeftToSell,
CannotOversellBaseAsset,
FeeIsMoreThanPurchasedAmount,
NotHoldEnoughFundToSell,
CannotDepositToBuyer,
CannotDepositSwapFee,
UpdateMarketMakerSwapFailed,
DeleteSwapFailed,
ReleaseUnswappedFundsFailed,
UpdateAccountSwapRequestStatusFailed,
UpdateTraderSwapFailed,
TransferTraderSwapAssetsToMarketMakerFailed,
TransferTraderSwapFeeFailed,
TraderSwapFeeRegistrationFailed,
TransferMarketMakerSwapAssetsToTraderFailed,
TransferMarketMakerSwapFeeFailed,
MarketMakerSwapFeeRegistrationFailed,
SwapOverflow,
UnknownError,
// some variants omitted
}
Expand description
Custom dispatch errors of this pallet.
Variants§
OraclePaused
The Quorum is paused. Try again later.
AccessDenied
The access to the Oracle pallet is not allowed for this account ID.
InvalidRequestId
Invalid request ID.
InvalidSwapStatus
Invalid swap request status.
SwapAssetsShouldBeDifferent
Swap request assets must be different.
InvalidMarketMakerRequestId
Invalid market maker request ID, includes an index in the SwapConfirmation list
InvalidMarketMakerSwapRequestStatus
Invalid market maker swap request status.
BuySellAssetMismatch
Buyer and seller assets must match.
UnknownAsset
Unknown Asset.
SlippageOverflow
Unable to calculate slippage
ArithmeticError
Arithmetic error
OfferIsLessThanSwapLowerBound
Request contains offer that is less than swap lower bound
OfferIsGreaterThanSwapUpperBound
Request contains offer that is greater than swap upper bound
OfferIsLessThanMarketMakerSwapLowerBound
Request contains offer that is less than market maker swap lower bound
OfferIsGreaterThanMarketMakerSwapUpperBound
Request contains offer that is greater than market maker swap upper bound
NoLowerBoundForBuyingPrice
Slippage validation blocks buying with low price
NoUpperBoundForSellingPrice
Slippage validation blocks selling with high price
NonMarketMakerSwap
Swap is not created by a market maker
MarketPairNotSupported
Trader swap market pair is not supported
MarketPairAlreadySupported
Market pair is already supported
MarketPairOverflow
The number of supported market pairs overflow.
MarketMakerSwapTypeIsNotLimit
Market maker swap type is not limit
MarketMakerSwapHasNotEnoughTokenLeftToSell
Market Maker swap does not have enough funds left to sell
TraderSwapHasNotEnoughTokenLeftToSell
Trader swap does not have enough funds left to sell
CannotOversellBaseAsset
Trader and Market Maker swaps cannot oversell base asset
FeeIsMoreThanPurchasedAmount
The fee cannot be greater than purchased amount
NotHoldEnoughFundToSell
Seller does not hold enough funds to sell.
CannotDepositToBuyer
Cannot deposit funds to the buyer.
CannotDepositSwapFee
Cannot deposit swap fees to the Fees account.
UpdateMarketMakerSwapFailed
Failed to update market maker swap
DeleteSwapFailed
Delete trader’s swap request from Swaps failed
ReleaseUnswappedFundsFailed
Release unswapped funds failed
UpdateAccountSwapRequestStatusFailed
Update trader’s swap request status in AccountSwaps failed
UpdateTraderSwapFailed
Failed to update trader swap
TransferTraderSwapAssetsToMarketMakerFailed
Transfer reserved trader selling tokens to market maker failed
TransferTraderSwapFeeFailed
Transfer reserved trader swap fee to market maker failed
TraderSwapFeeRegistrationFailed
Unable to register trade swap network fees.
TransferMarketMakerSwapAssetsToTraderFailed
Transfer reserved market maker selling tokens to trader failed
TransferMarketMakerSwapFeeFailed
Transfer reserved market maker swap fee to trader failed
MarketMakerSwapFeeRegistrationFailed
Unable to register market maker swap network fees.
SwapOverflow
Swaps cap reached for this account id
UnknownError
Unknown Error.
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) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> 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 = 2usize
const MAX_ENCODED_SIZE: usize = 2usize
impl<T> EncodeLike<Error<T>> for Error<T>
Auto Trait Implementations§
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> 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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresource§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
fn blake2_128(&self) -> [u8; 16]
fn blake2_256(&self) -> [u8; 32]
fn blake2_128_concat(&self) -> Vec<u8, Global> ⓘ
fn twox_128(&self) -> [u8; 16]
fn twox_256(&self) -> [u8; 32]
fn twox_64_concat(&self) -> Vec<u8, Global> ⓘ
fn identity(&self) -> Vec<u8, Global> ⓘ
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, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
source§impl<T> Pointable for T
impl<T> Pointable 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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.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 Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.