#[repr(u32)]pub enum ReturnErrorCode {
Success = 0,
CalleeTrapped = 1,
CalleeReverted = 2,
KeyNotFound = 3,
TransferFailed = 4,
OutOfResources = 5,
EcdsaRecoveryFailed = 7,
Sr25519VerifyFailed = 8,
DuplicateContractAddress = 11,
Unknown = 12,
}
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.
TransferFailed = 4
Transfer failed for other not further specified reason. Most probably reserved or locked balance of the sender that was preventing the transfer.
OutOfResources = 5
The subcall ran out of weight or storage deposit.
EcdsaRecoveryFailed = 7
ECDSA public key recovery failed. Most probably wrong recovery id or signature.
Sr25519VerifyFailed = 8
sr25519 signature verification failed.
DuplicateContractAddress = 11
Contract instantiation failed because the address already exists. Occurs when instantiating the same contract with the same salt more than once.
Unknown = 12
Returns if an unknown error was received from the host module.