Enum odra_modules::cep18::errors::Error

source ·
pub enum Error {
Show 21 variants InvalidContext = 60_000, InsufficientBalance = 60_001, InsufficientAllowance = 60_002, Overflow = 60_003, PackageHashMissing = 60_004, PackageHashNotPackage = 60_005, InvalidEventsMode = 60_006, MissingEventsMode = 60_007, Phantom = 60_008, FailedToGetArgBytes = 60_009, InsufficientRights = 60_010, InvalidAdminList = 60_011, InvalidMinterList = 60_012, InvalidNoneList = 60_013, InvalidEnableMBFlag = 60_014, AlreadyInitialized = 60_015, MintBurnDisabled = 60_016, CannotTargetSelfUser = 60_017, InvalidBurnTarget = 60_018, _MissingPackageHashForUpgrade = 60_019, InvalidState = 60_100,
}
Expand description

Error enum for the CEP-18 contract.

Variants§

§

InvalidContext = 60_000

CEP-18 contract called from within an invalid context.

§

InsufficientBalance = 60_001

Spender does not have enough balance.

§

InsufficientAllowance = 60_002

Spender does not have enough allowance approved.

§

Overflow = 60_003

Operation would cause an integer overflow.

§

PackageHashMissing = 60_004

A required package hash was not specified.

§

PackageHashNotPackage = 60_005

The package hash specified does not represent a package.

§

InvalidEventsMode = 60_006

An invalid event mode was specified.

§

MissingEventsMode = 60_007

The event mode required was not specified.

§

Phantom = 60_008

An unknown error occurred.

§

FailedToGetArgBytes = 60_009

Failed to read the runtime arguments provided.

§

InsufficientRights = 60_010

The caller does not have sufficient security access.

§

InvalidAdminList = 60_011

The list of Admin accounts provided is invalid.

§

InvalidMinterList = 60_012

The list of accounts that can mint tokens is invalid.

§

InvalidNoneList = 60_013

The list of accounts with no access rights is invalid.

§

InvalidEnableMBFlag = 60_014

The flag to enable the mint and burn mode is invalid.

§

AlreadyInitialized = 60_015

This contract instance cannot be initialized again.

§

MintBurnDisabled = 60_016

The mint and burn mode is disabled.

§

CannotTargetSelfUser = 60_017

The user cannot target themselves.

§

InvalidBurnTarget = 60_018

The burn target is invalid.

§

_MissingPackageHashForUpgrade = 60_019

The package hash for the upgrade is missing. This error is not used by Odra implementation yet.

§

InvalidState = 60_100

The contract is in an invalid state. This error should never happen.

Trait Implementations§

source§

impl From<Error> for OdraError

source§

fn from(error: Error) -> Self

Converts to this type from the input type.
source§

impl SchemaErrors for Error

source§

fn schema_errors() -> Vec<UserError>

Returns a vector of UserErrors.

Auto Trait Implementations§

§

impl Freeze for Error

§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.