#[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§
source§impl Debug for ReturnErrorCode
impl Debug for ReturnErrorCode
source§impl From<ReturnErrorCode> for u32
impl From<ReturnErrorCode> for u32
source§fn from(code: ReturnErrorCode) -> u32
fn from(code: ReturnErrorCode) -> u32
source§impl PartialEq for ReturnErrorCode
impl PartialEq for ReturnErrorCode
source§fn eq(&self, other: &ReturnErrorCode) -> bool
fn eq(&self, other: &ReturnErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.