Enum casper_types::contracts::Error
source · #[non_exhaustive]#[repr(u8)]pub enum Error {
PreviouslyUsedVersion = 1,
ContractNotFound = 2,
GroupAlreadyExists = 3,
MaxGroupsExceeded = 4,
MaxTotalURefsExceeded = 5,
GroupDoesNotExist = 6,
UnableToRemoveURef = 7,
GroupInUse = 8,
URefAlreadyExists = 9,
}Expand description
Set of errors which may happen when working with contract headers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PreviouslyUsedVersion = 1
Attempt to override an existing or previously existing version with a new header (this is not allowed to ensure immutability of a given version).
assert_eq!(1, Error::PreviouslyUsedVersion as u8);ContractNotFound = 2
Attempted to disable a contract that does not exist.
assert_eq!(2, Error::ContractNotFound as u8);GroupAlreadyExists = 3
Attempted to create a user group which already exists (use the update function to change an existing user group).
assert_eq!(3, Error::GroupAlreadyExists as u8);MaxGroupsExceeded = 4
Attempted to add a new user group which exceeds the allowed maximum number of groups.
assert_eq!(4, Error::MaxGroupsExceeded as u8);MaxTotalURefsExceeded = 5
Attempted to add a new URef to a group, which resulted in the total number of URefs across all user groups to exceed the allowed maximum.
assert_eq!(5, Error::MaxTotalURefsExceeded as u8);GroupDoesNotExist = 6
Attempted to remove a URef from a group, which does not exist in the group.
assert_eq!(6, Error::GroupDoesNotExist as u8);UnableToRemoveURef = 7
Attempted to remove unknown URef from the group.
assert_eq!(7, Error::UnableToRemoveURef as u8);GroupInUse = 8
Group is use by at least one active contract.
assert_eq!(8, Error::GroupInUse as u8);URefAlreadyExists = 9
URef already exists in given group.
assert_eq!(9, Error::URefAlreadyExists as u8);