Enum casper_types::system::mint::Error
source · #[non_exhaustive]#[repr(u8)]pub enum Error {
Show 22 variants
InsufficientFunds = 0,
SourceNotFound = 1,
DestNotFound = 2,
InvalidURef = 3,
InvalidAccessRights = 4,
InvalidNonEmptyPurseCreation = 5,
Storage = 6,
PurseNotFound = 7,
MissingKey = 8,
TotalSupplyNotFound = 9,
RecordTransferFailure = 10,
InvalidTotalSupplyReductionAttempt = 11,
NewURef = 12,
PutKey = 13,
WriteDictionary = 14,
CLValue = 15,
Serialize = 16,
EqualSourceAndTarget = 17,
ArithmeticOverflow = 18,
InvalidContext = 20,
UnapprovedSpendingAmount = 21,
DisabledUnrestrictedTransfers = 22,
}Expand description
Errors which can occur while executing the Mint contract.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InsufficientFunds = 0
Insufficient funds to complete the transfer.
assert_eq!(0, Error::InsufficientFunds as u8);SourceNotFound = 1
Source purse not found.
assert_eq!(1, Error::SourceNotFound as u8);DestNotFound = 2
Destination purse not found.
assert_eq!(2, Error::DestNotFound as u8);InvalidURef = 3
The given URef does not reference the account holder’s purse, or such a
URef does not have the required AccessRights.
assert_eq!(3, Error::InvalidURef as u8);InvalidAccessRights = 4
The source purse is not writeable (see URef::is_writeable),
or the destination purse is not addable (see
URef::is_addable).
assert_eq!(4, Error::InvalidAccessRights as u8);InvalidNonEmptyPurseCreation = 5
Tried to create a new purse with a non-zero initial balance.
assert_eq!(5, Error::InvalidNonEmptyPurseCreation as u8);Storage = 6
Failed to read from local or global storage.
assert_eq!(6, Error::Storage as u8);PurseNotFound = 7
Purse not found while trying to get balance.
assert_eq!(7, Error::PurseNotFound as u8);MissingKey = 8
Unable to obtain a key by its name.
assert_eq!(8, Error::MissingKey as u8);TotalSupplyNotFound = 9
Total supply not found.
assert_eq!(9, Error::TotalSupplyNotFound as u8);RecordTransferFailure = 10
Failed to record transfer.
assert_eq!(10, Error::RecordTransferFailure as u8);InvalidTotalSupplyReductionAttempt = 11
Invalid attempt to reduce total supply.
assert_eq!(11, Error::InvalidTotalSupplyReductionAttempt as u8);NewURef = 12
Failed to create new uref.
assert_eq!(12, Error::NewURef as u8);PutKey = 13
Failed to put key.
assert_eq!(13, Error::PutKey as u8);WriteDictionary = 14
Failed to write to dictionary.
assert_eq!(14, Error::WriteDictionary as u8);CLValue = 15
Failed to create a crate::CLValue.
assert_eq!(15, Error::CLValue as u8);Serialize = 16
Failed to serialize data.
assert_eq!(16, Error::Serialize as u8);EqualSourceAndTarget = 17
Source and target purse crate::URefs are equal.
assert_eq!(17, Error::EqualSourceAndTarget as u8);ArithmeticOverflow = 18
An arithmetic overflow has occurred.
assert_eq!(18, Error::ArithmeticOverflow as u8);InvalidContext = 20
Raised when an entry point is called from invalid account context.
UnapprovedSpendingAmount = 21
Session code tried to transfer more CSPR than user approved.
assert_eq!(21, Error::UnapprovedSpendingAmount as u8);DisabledUnrestrictedTransfers = 22
Failed to transfer tokens on a private chain.
assert_eq!(22, Error::DisabledUnrestrictedTransfers as u8);Trait Implementations§
source§impl PartialEq for Error
impl PartialEq for Error
source§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.