Enum casper_types::system::auction::Error
source · #[repr(u8)]pub enum Error {
Show 46 variants
MissingKey,
InvalidKeyVariant,
MissingValue,
Serialization,
TransferToBidPurse,
InvalidAmount,
BidNotFound,
ValidatorNotFound,
DelegatorNotFound,
Storage,
Bonding,
Unbonding,
ReleaseFounderStake,
GetBalance,
InvalidContext,
ValidatorFundsLocked,
InvalidCaller,
InvalidPublicKey,
BondNotFound,
CreatePurseFailed,
UnbondTooLarge,
BondTooSmall,
MissingDelegations,
MismatchedEraValidators,
MintReward,
InvalidValidatorSlotsValue,
MintReduceTotalSupply,
TransferToDelegatorPurse,
ValidatorRewardTransfer,
DelegatorRewardTransfer,
WithdrawDelegatorReward,
WithdrawValidatorReward,
TransferToUnbondingPurse,
RecordEraInfo,
CLValue,
MissingSeigniorageRecipients,
Transfer,
DelegationRateTooLarge,
DelegatorFundsLocked,
ArithmeticOverflow,
RuntimeStackOverflow,
MintError,
ExceededDelegatorSizeLimit,
GlobalDelegatorCapacityReached,
DelegationAmountTooSmall,
RuntimeStack,
// some variants omitted
}Expand description
Errors which can occur while executing the Auction contract.
Variants§
MissingKey
Unable to find named key in the contract’s named keys.
assert_eq!(0, Error::MissingKey as u8);InvalidKeyVariant
Given named key contains invalid variant.
assert_eq!(1, Error::InvalidKeyVariant as u8);MissingValue
Value under an uref does not exist. This means the installer contract didn’t work properly.
assert_eq!(2, Error::MissingValue as u8);Serialization
ABI serialization issue while reading or writing.
assert_eq!(3, Error::Serialization as u8);TransferToBidPurse
Triggered when contract was unable to transfer desired amount of tokens into a bid purse.
assert_eq!(4, Error::TransferToBidPurse as u8);InvalidAmount
User passed invalid amount of tokens which might result in wrong values after calculation.
assert_eq!(5, Error::InvalidAmount as u8);BidNotFound
Unable to find a bid by account hash in active_bids map.
assert_eq!(6, Error::BidNotFound as u8);ValidatorNotFound
Validator’s account hash was not found in the map.
assert_eq!(7, Error::ValidatorNotFound as u8);DelegatorNotFound
Delegator’s account hash was not found in the map.
assert_eq!(8, Error::DelegatorNotFound as u8);Storage
Storage problem.
assert_eq!(9, Error::Storage as u8);Bonding
Raised when system is unable to bond.
assert_eq!(10, Error::Bonding as u8);Unbonding
Raised when system is unable to unbond.
assert_eq!(11, Error::Unbonding as u8);ReleaseFounderStake
Raised when Mint contract is unable to release founder stake.
assert_eq!(12, Error::ReleaseFounderStake as u8);GetBalance
Raised when the system is unable to determine purse balance.
assert_eq!(13, Error::GetBalance as u8);InvalidContext
Raised when an entry point is called from invalid account context.
assert_eq!(14, Error::InvalidContext as u8);ValidatorFundsLocked
Raised whenever a validator’s funds are still locked in but an attempt to withdraw was made.
assert_eq!(15, Error::ValidatorFundsLocked as u8);InvalidCaller
Raised when caller is not the system account.
assert_eq!(16, Error::InvalidCaller as u8);InvalidPublicKey
Raised when function is supplied a public key that does match the caller’s or does not have an associated account.
assert_eq!(17, Error::InvalidPublicKey as u8);BondNotFound
Validator is not not bonded.
assert_eq!(18, Error::BondNotFound as u8);CreatePurseFailed
Unable to create purse.
assert_eq!(19, Error::CreatePurseFailed as u8);UnbondTooLarge
Attempted to unbond an amount which was too large.
assert_eq!(20, Error::UnbondTooLarge as u8);BondTooSmall
Attempted to bond with a stake which was too small.
assert_eq!(21, Error::BondTooSmall as u8);MissingDelegations
Raised when rewards are to be distributed to delegators, but the validator has no delegations.
assert_eq!(22, Error::MissingDelegations as u8);MismatchedEraValidators
The validators returned by the consensus component should match current era validators when distributing rewards.
assert_eq!(23, Error::MismatchedEraValidators as u8);MintReward
Failed to mint reward tokens.
assert_eq!(24, Error::MintReward as u8);InvalidValidatorSlotsValue
Invalid number of validator slots.
assert_eq!(25, Error::InvalidValidatorSlotsValue as u8);MintReduceTotalSupply
Failed to reduce total supply.
assert_eq!(26, Error::MintReduceTotalSupply as u8);TransferToDelegatorPurse
Triggered when contract was unable to transfer desired amount of tokens into a delegators purse.
assert_eq!(27, Error::TransferToDelegatorPurse as u8);ValidatorRewardTransfer
Triggered when contract was unable to perform a transfer to distribute validators reward.
assert_eq!(28, Error::ValidatorRewardTransfer as u8);DelegatorRewardTransfer
Triggered when contract was unable to perform a transfer to distribute delegators rewards.
assert_eq!(29, Error::DelegatorRewardTransfer as u8);WithdrawDelegatorReward
Failed to transfer desired amount while withdrawing delegators reward.
assert_eq!(30, Error::WithdrawDelegatorReward as u8);WithdrawValidatorReward
Failed to transfer desired amount while withdrawing validators reward.
assert_eq!(31, Error::WithdrawValidatorReward as u8);TransferToUnbondingPurse
Failed to transfer desired amount into unbonding purse.
assert_eq!(32, Error::TransferToUnbondingPurse as u8);RecordEraInfo
Failed to record era info.
assert_eq!(33, Error::RecordEraInfo as u8);CLValue
Failed to create a crate::CLValue.
assert_eq!(34, Error::CLValue as u8);MissingSeigniorageRecipients
Missing seigniorage recipients for given era.
assert_eq!(35, Error::MissingSeigniorageRecipients as u8);Transfer
Failed to transfer funds.
assert_eq!(36, Error::Transfer as u8);DelegationRateTooLarge
Delegation rate exceeds rate.
assert_eq!(37, Error::DelegationRateTooLarge as u8);DelegatorFundsLocked
Raised whenever a delegator’s funds are still locked in but an attempt to undelegate was made.
assert_eq!(38, Error::DelegatorFundsLocked as u8);ArithmeticOverflow
An arithmetic overflow has occurred.
assert_eq!(39, Error::ArithmeticOverflow as u8);RuntimeStackOverflow
Too many frames on the runtime stack.
assert_eq!(41, Error::RuntimeStackOverflow as u8);MintError
An error that is raised when there is an error in the mint contract that cannot be mapped to a specific auction error.
ExceededDelegatorSizeLimit
The validator has exceeded the maximum amount of delegators allowed.
assert_eq!(43, Error::ExceededDelegatorSizeLimit as u8);GlobalDelegatorCapacityReached
The global delegator capacity for the auction has been reached.
assert_eq!(44, Error::GlobalDelegatorCapacityReached as u8);DelegationAmountTooSmall
The delegated amount is below the minimum allowed.
assert_eq!(45, Error::DelegationAmountTooSmall as u8);RuntimeStack
Runtime stack error.
assert_eq!(46, Error::RuntimeStack as u8);Trait Implementations§
source§impl Ord for Error
impl Ord for Error
source§impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
source§impl PartialOrd<Error> for Error
impl PartialOrd<Error> for Error
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl ToBytes for Error
impl ToBytes for Error
source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Vec<u8> which would be returned from a successful call to
to_bytes() or into_bytes(). The data is not actually serialized, so this call is
relatively cheap.impl Copy for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§impl<T> Pipe for T
impl<T> Pipe for T
§impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
§impl<T> PipeDeref for T
impl<T> PipeDeref for T
§impl<T> PipeRef for T
impl<T> PipeRef for T
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,
§fn pipe_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Selfwhere F: FnOnce(&Self) -> R,
§fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere F: FnOnce(&Self) -> R,
tap in debug builds, and does nothing in release builds.§fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Selfwhere F: FnOnce(&mut Self) -> R,
§fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere F: FnOnce(&mut Self) -> R,
tap_mut in debug builds, and does nothing in release builds.§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere U: ?Sized,
§fn tap_ref<F, R>(self, func: F) -> Selfwhere
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref<F, R>(self, func: F) -> Selfwhere Self: AsRef<T>, F: FnOnce(&T) -> R,
§fn tap_ref_dbg<F, R>(self, func: F) -> Selfwhere
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref_dbg<F, R>(self, func: F) -> Selfwhere Self: AsRef<T>, F: FnOnce(&T) -> R,
tap_ref in debug builds, and does nothing in release builds.§fn tap_ref_mut<F, R>(self, func: F) -> Selfwhere
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut<F, R>(self, func: F) -> Selfwhere Self: AsMut<T>, F: FnOnce(&mut T) -> R,
§fn tap_ref_mut_dbg<F, R>(self, func: F) -> Selfwhere
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Selfwhere Self: AsMut<T>, F: FnOnce(&mut T) -> R,
tap_ref_mut in debug builds, and does nothing in release builds.§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere U: ?Sized,
§fn tap_borrow<F, R>(self, func: F) -> Selfwhere
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow<F, R>(self, func: F) -> Selfwhere Self: Borrow<T>, F: FnOnce(&T) -> R,
§fn tap_borrow_dbg<F, R>(self, func: F) -> Selfwhere
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow_dbg<F, R>(self, func: F) -> Selfwhere Self: Borrow<T>, F: FnOnce(&T) -> R,
tap_borrow in debug builds, and does nothing in release builds.§fn tap_borrow_mut<F, R>(self, func: F) -> Selfwhere
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut<F, R>(self, func: F) -> Selfwhere Self: BorrowMut<T>, F: FnOnce(&mut T) -> R,
§fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Selfwhere
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Selfwhere Self: BorrowMut<T>, F: FnOnce(&mut T) -> R,
tap_borrow_mut in debug builds, and does nothing in release
builds.§impl<T> TapDeref for T
impl<T> TapDeref for T
§fn tap_deref<F, R>(self, func: F) -> Selfwhere
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref<F, R>(self, func: F) -> Selfwhere Self: Deref, F: FnOnce(&Self::Target) -> R,
self for inspection.§fn tap_deref_dbg<F, R>(self, func: F) -> Selfwhere
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref_dbg<F, R>(self, func: F) -> Selfwhere Self: Deref, F: FnOnce(&Self::Target) -> R,
tap_deref in debug builds, and does nothing in release builds.§fn tap_deref_mut<F, R>(self, func: F) -> Selfwhere
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut<F, R>(self, func: F) -> Selfwhere Self: DerefMut, F: FnOnce(&mut Self::Target) -> R,
self for modification.§fn tap_deref_mut_dbg<F, R>(self, func: F) -> Selfwhere
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut_dbg<F, R>(self, func: F) -> Selfwhere Self: DerefMut, F: FnOnce(&mut Self::Target) -> R,
tap_deref_mut in debug builds, and does nothing in release
builds.