Enum casper_types::system::auction::Error [−][src]
#[repr(u8)]
pub enum Error {
Show 40 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,
// some variants omitted
}
Expand description
Errors which can occur while executing the Auction contract.
Variants
Unable to find named key in the contract’s named keys.
assert_eq!(0, Error::MissingKey as u8);
Given named key contains invalid variant.
assert_eq!(1, Error::InvalidKeyVariant as u8);
Value under an uref does not exist. This means the installer contract didn’t work properly.
assert_eq!(2, Error::MissingValue as u8);
ABI serialization issue while reading or writing.
assert_eq!(3, Error::Serialization as u8);
Triggered when contract was unable to transfer desired amount of tokens into a bid purse.
assert_eq!(4, Error::TransferToBidPurse as u8);
User passed invalid amount of tokens which might result in wrong values after calculation.
assert_eq!(5, Error::InvalidAmount as u8);
Unable to find a bid by account hash in active_bids
map.
assert_eq!(6, Error::BidNotFound as u8);
Validator’s account hash was not found in the map.
assert_eq!(7, Error::ValidatorNotFound as u8);
Delegator’s account hash was not found in the map.
assert_eq!(8, Error::DelegatorNotFound as u8);
Storage problem.
assert_eq!(9, Error::Storage as u8);
Raised when system is unable to bond.
assert_eq!(10, Error::Bonding as u8);
Raised when system is unable to unbond.
assert_eq!(11, Error::Unbonding as u8);
Raised when Mint contract is unable to release founder stake.
assert_eq!(12, Error::ReleaseFounderStake as u8);
Raised when the system is unable to determine purse balance.
assert_eq!(13, Error::GetBalance as u8);
Raised when an entry point is called from invalid account context.
assert_eq!(14, Error::InvalidContext as u8);
Raised whenever a validator’s funds are still locked in but an attempt to withdraw was made.
assert_eq!(15, Error::ValidatorFundsLocked as u8);
Raised when caller is not the system account.
assert_eq!(16, Error::InvalidCaller as u8);
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);
Validator is not not bonded.
assert_eq!(18, Error::BondNotFound as u8);
Unable to create purse.
assert_eq!(19, Error::CreatePurseFailed as u8);
Attempted to unbond an amount which was too large.
assert_eq!(20, Error::UnbondTooLarge as u8);
Attempted to bond with a stake which was too small.
assert_eq!(21, Error::BondTooSmall as u8);
Raised when rewards are to be distributed to delegators, but the validator has no delegations.
assert_eq!(22, Error::MissingDelegations as u8);
The validators returned by the consensus component should match current era validators when distributing rewards.
assert_eq!(23, Error::MismatchedEraValidators as u8);
Failed to mint reward tokens.
assert_eq!(24, Error::MintReward as u8);
Invalid number of validator slots.
assert_eq!(25, Error::InvalidValidatorSlotsValue as u8);
Failed to reduce total supply.
assert_eq!(26, Error::MintReduceTotalSupply as u8);
Triggered when contract was unable to transfer desired amount of tokens into a delegators purse.
assert_eq!(27, Error::TransferToDelegatorPurse as u8);
Triggered when contract was unable to perform a transfer to distribute validators reward.
assert_eq!(28, Error::ValidatorRewardTransfer as u8);
Triggered when contract was unable to perform a transfer to distribute delegators rewards.
assert_eq!(29, Error::DelegatorRewardTransfer as u8);
Failed to transfer desired amount while withdrawing delegators reward.
assert_eq!(30, Error::WithdrawDelegatorReward as u8);
Failed to transfer desired amount while withdrawing validators reward.
assert_eq!(31, Error::WithdrawValidatorReward as u8);
Failed to transfer desired amount into unbonding purse.
assert_eq!(32, Error::TransferToUnbondingPurse as u8);
Failed to record era info.
assert_eq!(33, Error::RecordEraInfo as u8);
Failed to create a crate::CLValue
.
assert_eq!(34, Error::CLValue as u8);
Missing seigniorage recipients for given era.
assert_eq!(35, Error::MissingSeigniorageRecipients as u8);
Failed to transfer funds.
assert_eq!(36, Error::Transfer as u8);
Delegation rate exceeds rate.
assert_eq!(37, Error::DelegationRateTooLarge as u8);
Raised whenever a delegator’s funds are still locked in but an attempt to undelegate was made.
assert_eq!(38, Error::DelegatorFundsLocked as u8);
An arithmetic overflow has occurred.
assert_eq!(39, Error::ArithmeticOverflow as u8);
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the length of the 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. Read more
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
Causes 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,
Causes self
to use its Display
implementation when
Debug
-formatted. Read more
fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
Causes self
to use its LowerExp
implementation when
Debug
-formatted. Read more
fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
Causes self
to use its LowerHex
implementation when
Debug
-formatted. Read more
Causes 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,
Causes self
to use its Pointer
implementation when
Debug
-formatted. Read more
fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
Causes self
to use its UpperExp
implementation when
Debug
-formatted. Read more
fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
Causes self
to use its UpperHex
implementation when
Debug
-formatted. Read more
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_as_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
fn pipe_as_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
Pipes a dereference into a function that cannot normally be called in suffix position. Read more
fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more
Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more
Provides immutable access for inspection. Read more
Calls tap
in debug builds, and does nothing in release builds.
Provides mutable access for modification. Read more
fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
Calls tap_mut
in debug builds, and does nothing in release builds.
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
Provides immutable access to the reference for inspection.
fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Calls tap_ref
in debug builds, and does nothing in release builds.
fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the reference for modification.
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Calls tap_ref_mut
in debug builds, and does nothing in release builds.
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Provides immutable access to the borrow for inspection. Read more
fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Calls tap_borrow
in debug builds, and does nothing in release builds.
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the borrow for modification.
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Calls tap_borrow_mut
in debug builds, and does nothing in release
builds. Read more
Immutably dereferences self
for inspection.
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Calls tap_deref
in debug builds, and does nothing in release builds.
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Mutably dereferences self
for modification.
fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Calls tap_deref_mut
in debug builds, and does nothing in release
builds. Read more