Enum casper_types::system::handle_payment::Error[][src]

#[repr(u8)]pub enum Error {
    NotBonded,
    TooManyEventsInQueue,
    CannotUnbondLastValidator,
    SpreadTooHigh,
    MultipleRequests,
    BondTooSmall,
    BondTooLarge,
    UnbondTooLarge,
    BondTransferFailed,
    UnbondTransferFailed,
    TimeWentBackwards,
    StakesNotFound,
    PaymentPurseNotFound,
    PaymentPurseKeyUnexpectedType,
    PaymentPurseBalanceNotFound,
    BondingPurseNotFound,
    BondingPurseKeyUnexpectedType,
    RefundPurseKeyUnexpectedType,
    RewardsPurseNotFound,
    RewardsPurseKeyUnexpectedType,
    StakesKeyDeserializationFailed,
    StakesDeserializationFailed,
    SystemFunctionCalledByUserAccount,
    InsufficientPaymentForAmountSpent,
    FailedTransferToRewardsPurse,
    FailedTransferToAccountPurse,
    SetRefundPurseCalledOutsidePayment,
    GetBalance,
    PutKey,
    RemoveKey,
    Transfer,
    // some variants omitted
}

Errors which can occur while executing the Handle Payment contract.

Variants

NotBonded

The given validator is not bonded.

TooManyEventsInQueue

There are too many bonding or unbonding attempts already enqueued to allow more.

CannotUnbondLastValidator

At least one validator must remain bonded.

SpreadTooHigh

Failed to bond or unbond as this would have resulted in exceeding the maximum allowed difference between the largest and smallest stakes.

MultipleRequests

The given validator already has a bond or unbond attempt enqueued.

BondTooSmall

Attempted to bond with a stake which was too small.

BondTooLarge

Attempted to bond with a stake which was too large.

UnbondTooLarge

Attempted to unbond an amount which was too large.

BondTransferFailed

While bonding, the transfer from source purse to the Handle Payment internal purse failed.

UnbondTransferFailed

While unbonding, the transfer from the Handle Payment internal purse to the destination purse failed.

TimeWentBackwards

Internal error: a BlockTime was unexpectedly out of sequence.

StakesNotFound

Internal error: stakes were unexpectedly empty.

PaymentPurseNotFound

Internal error: the Handle Payment contract’s payment purse wasn’t found.

PaymentPurseKeyUnexpectedType

Internal error: the Handle Payment contract’s payment purse key was the wrong type.

PaymentPurseBalanceNotFound

Internal error: couldn’t retrieve the balance for the Handle Payment contract’s payment purse.

BondingPurseNotFound

Internal error: the Handle Payment contract’s bonding purse wasn’t found.

BondingPurseKeyUnexpectedType

Internal error: the Handle Payment contract’s bonding purse key was the wrong type.

RefundPurseKeyUnexpectedType

Internal error: the Handle Payment contract’s refund purse key was the wrong type.

RewardsPurseNotFound

Internal error: the Handle Payment contract’s rewards purse wasn’t found.

RewardsPurseKeyUnexpectedType

Internal error: the Handle Payment contract’s rewards purse key was the wrong type.

StakesKeyDeserializationFailed

Internal error: failed to deserialize the stake’s key.

StakesDeserializationFailed

Internal error: failed to deserialize the stake’s balance.

SystemFunctionCalledByUserAccount

The invoked Handle Payment function can only be called by system contracts, but was called by a user contract.

InsufficientPaymentForAmountSpent

Internal error: while finalizing payment, the amount spent exceeded the amount available.

FailedTransferToRewardsPurse

Internal error: while finalizing payment, failed to pay the validators (the transfer from the Handle Payment contract’s payment purse to rewards purse failed).

FailedTransferToAccountPurse

Internal error: while finalizing payment, failed to refund the caller’s purse (the transfer from the Handle Payment contract’s payment purse to refund purse or account’s main purse failed).

SetRefundPurseCalledOutsidePayment

Handle Payment contract’s “set_refund_purse” method can only be called by the payment code of a deploy, but was called by the session code.

GetBalance

Raised when the system is unable to determine purse balance.

PutKey

Raised when the system is unable to put named key.

RemoveKey

Raised when the system is unable to remove given named key.

Transfer

Failed to transfer funds.

Trait Implementations

impl CLTyped for Error[src]

impl Clone for Error[src]

impl Copy for Error[src]

impl Debug for Error[src]

impl Eq for Error[src]

impl From<Error> for ApiError[src]

impl From<Error> for Error[src]

impl PartialEq<Error> for Error[src]

impl StructuralEq for Error[src]

impl StructuralPartialEq for Error[src]

impl ToBytes for Error[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,