Enum ink_env::ReturnErrorCode
#[repr(u8)]pub enum ReturnErrorCode {
Show 16 variants
Success = 0,
CalleeTrapped = 1,
CalleeReverted = 2,
KeyNotFound = 3,
_BelowSubsistenceThreshold = 4,
TransferFailed = 5,
_EndowmentTooLow = 6,
CodeNotFound = 7,
NotCallable = 8,
LoggingDisabled = 9,
CallRuntimeFailed = 10,
EcdsaRecoveryFailed = 11,
Sr25519VerifyFailed = 12,
XcmExecutionFailed = 13,
XcmSendFailed = 14,
Unknown = 15,
}
Expand description
Every error that can be returned to a contract when it calls any of the host functions.
Variants§
Success = 0
API call successful.
CalleeTrapped = 1
The called function trapped and has its state changes reverted.
In this case no output buffer is returned.
Can only be returned from call
and instantiate
.
CalleeReverted = 2
The called function ran to completion but decided to revert its state.
An output buffer is returned when one was supplied.
Can only be returned from call
and instantiate
.
KeyNotFound = 3
The passed key does not exist in storage.
_BelowSubsistenceThreshold = 4
Deprecated and no longer returned: There is only the minimum balance.
TransferFailed = 5
Transfer failed for other not further specified reason. Most probably reserved or locked balance of the sender that was preventing the transfer.
_EndowmentTooLow = 6
Deprecated and no longer returned: Endowment is no longer required.
CodeNotFound = 7
No code could be found at the supplied code hash.
NotCallable = 8
The account that was called is no contract.
LoggingDisabled = 9
The call to debug_message
had no effect because debug message
recording was disabled.
CallRuntimeFailed = 10
The call dispatched by call_runtime
was executed but returned an error.
EcdsaRecoveryFailed = 11
ECDSA public key recovery failed. Most probably wrong recovery id or signature.
Sr25519VerifyFailed = 12
sr25519 signature verification failed.
XcmExecutionFailed = 13
The xcm_execute
call failed.
XcmSendFailed = 14
The xcm_send
call failed.
Unknown = 15
Returns if an unknown error was received from the host module.
Trait Implementations§
§impl Debug for ReturnErrorCode
impl Debug for ReturnErrorCode
source§impl From<ReturnErrorCode> for Error
impl From<ReturnErrorCode> for Error
source§fn from(value: ReturnErrorCode) -> Self
fn from(value: ReturnErrorCode) -> Self
§impl PartialEq for ReturnErrorCode
impl PartialEq for ReturnErrorCode
§fn eq(&self, other: &ReturnErrorCode) -> bool
fn eq(&self, other: &ReturnErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for ReturnErrorCode
impl StructuralPartialEq for ReturnErrorCode
Auto Trait Implementations§
impl Freeze for ReturnErrorCode
impl RefUnwindSafe for ReturnErrorCode
impl Send for ReturnErrorCode
impl Sync for ReturnErrorCode
impl Unpin for ReturnErrorCode
impl UnwindSafe for ReturnErrorCode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.