pub enum Error<T> {
Show 56 variants
InvalidSchedule = 1,
InvalidCallFlags = 2,
OutOfGas = 3,
TransferFailed = 4,
MaxCallDepthReached = 5,
ContractNotFound = 6,
CodeNotFound = 7,
CodeInfoNotFound = 8,
OutOfBounds = 9,
DecodingFailed = 10,
ContractTrapped = 11,
ValueTooLarge = 12,
TerminatedWhileReentrant = 13,
InputForwarded = 14,
TooManyTopics = 15,
DuplicateContract = 18,
TerminatedInConstructor = 19,
ReentranceDenied = 20,
ReenteredPallet = 21,
StateChangeDenied = 22,
StorageDepositNotEnoughFunds = 23,
StorageDepositLimitExhausted = 24,
CodeInUse = 25,
ContractReverted = 26,
CodeRejected = 27,
BlobTooLarge = 28,
StaticMemoryTooLarge = 29,
BasicBlockTooLarge = 30,
InvalidInstruction = 31,
MaxDelegateDependenciesReached = 32,
DelegateDependencyNotFound = 33,
DelegateDependencyAlreadyExists = 34,
CannotAddSelfAsDelegateDependency = 35,
OutOfTransientStorage = 36,
InvalidSyscall = 37,
InvalidStorageFlags = 38,
ExecutionFailed = 39,
BalanceConversionFailed = 40,
InvalidImmutableAccess = 42,
AccountUnmapped = 43,
AccountAlreadyMapped = 44,
InvalidGenericTransaction = 45,
RefcountOverOrUnderflow = 46,
UnsupportedPrecompileAddress = 47,
CallDataTooLarge = 48,
ReturnDataTooLarge = 49,
InvalidJump = 50,
StackUnderflow = 51,
StackOverflow = 52,
TxFeeOverdraw = 53,
EvmConstructorNonEmptyData = 54,
EvmConstructedFromHash = 55,
StorageRefundNotEnoughFunds = 56,
StorageRefundLocked = 57,
PrecompileDelegateDenied = 64,
EcdsaRecoveryFailed = 65,
// some variants omitted
}Expand description
The Error enum of this pallet.
Variants§
InvalidSchedule = 1
Invalid schedule supplied, e.g. with zero weight of a basic operation.
InvalidCallFlags = 2
Invalid combination of flags supplied to seal_call or seal_delegate_call.
OutOfGas = 3
The executed contract exhausted its gas limit.
TransferFailed = 4
Performing the requested transfer failed. Probably because there isn’t enough free balance in the sender’s account.
MaxCallDepthReached = 5
Performing a call was denied because the calling depth reached the limit of what is specified in the schedule.
ContractNotFound = 6
No contract was found at the specified address.
CodeNotFound = 7
No code could be found at the supplied code hash.
CodeInfoNotFound = 8
No code info could be found at the supplied code hash.
OutOfBounds = 9
A buffer outside of sandbox memory was passed to a contract API function.
DecodingFailed = 10
Input passed to a contract API function failed to decode as expected type.
ContractTrapped = 11
Contract trapped during execution.
ValueTooLarge = 12
Event body or storage item exceeds [limits::STORAGE_BYTES].
TerminatedWhileReentrant = 13
Termination of a contract is not allowed while the contract is already
on the call stack. Can be triggered by seal_terminate.
InputForwarded = 14
seal_call forwarded this contracts input. It therefore is no longer available.
TooManyTopics = 15
The amount of topics passed to seal_deposit_events exceeds the limit.
DuplicateContract = 18
A contract with the same AccountId already exists.
TerminatedInConstructor = 19
A contract self destructed in its constructor.
This can be triggered by a call to seal_terminate.
ReentranceDenied = 20
A call tried to invoke a contract that is flagged as non-reentrant.
ReenteredPallet = 21
A contract called into the runtime which then called back into this pallet.
StateChangeDenied = 22
A contract attempted to invoke a state modifying API while being in read-only mode.
StorageDepositNotEnoughFunds = 23
Origin doesn’t have enough balance to pay the required storage deposits.
StorageDepositLimitExhausted = 24
More storage was created than allowed by the storage deposit limit.
CodeInUse = 25
Code removal was denied because the code is still in use by at least one contract.
ContractReverted = 26
The contract ran to completion but decided to revert its storage changes.
Please note that this error is only returned from extrinsics. When called directly
or via RPC an Ok will be returned. In this case the caller needs to inspect the flags
to determine whether a reversion has taken place.
CodeRejected = 27
The contract failed to compile or is missing the correct entry points.
A more detailed error can be found on the node console if debug messages are enabled
by supplying -lruntime::revive=debug.
BlobTooLarge = 28
The code blob supplied is larger than [limits::code::BLOB_BYTES].
StaticMemoryTooLarge = 29
The contract declares too much memory (ro + rw + stack).
BasicBlockTooLarge = 30
The program contains a basic block that is larger than allowed.
InvalidInstruction = 31
The program contains an invalid instruction.
MaxDelegateDependenciesReached = 32
The contract has reached its maximum number of delegate dependencies.
DelegateDependencyNotFound = 33
The dependency was not found in the contract’s delegate dependencies.
DelegateDependencyAlreadyExists = 34
The contract already depends on the given delegate dependency.
CannotAddSelfAsDelegateDependency = 35
Can not add a delegate dependency to the code hash of the contract itself.
OutOfTransientStorage = 36
Can not add more data to transient storage.
InvalidSyscall = 37
The contract tried to call a syscall which does not exist (at its current api level).
InvalidStorageFlags = 38
Invalid storage flags were passed to one of the storage syscalls.
ExecutionFailed = 39
PolkaVM failed during code execution. Probably due to a malformed program.
BalanceConversionFailed = 40
Failed to convert a U256 to a Balance.
InvalidImmutableAccess = 42
Immutable data can only be set during deploys and only be read during calls. Additionally, it is only valid to set the data once and it must not be empty.
AccountUnmapped = 43
An AccountID32 account tried to interact with the pallet without having a mapping.
Call Pallet::map_account in order to create a mapping for the account.
AccountAlreadyMapped = 44
Tried to map an account that is already mapped.
InvalidGenericTransaction = 45
The transaction used to dry-run a contract is invalid.
RefcountOverOrUnderflow = 46
The refcount of a code either over or underflowed.
UnsupportedPrecompileAddress = 47
Unsupported precompile address.
CallDataTooLarge = 48
The calldata exceeds [limits::CALLDATA_BYTES].
ReturnDataTooLarge = 49
The return data exceeds [limits::CALLDATA_BYTES].
InvalidJump = 50
Invalid jump destination. Dynamic jumps points to invalid not jumpdest opcode.
StackUnderflow = 51
Attempting to pop a value from an empty stack.
StackOverflow = 52
Attempting to push a value onto a full stack.
TxFeeOverdraw = 53
Too much deposit was drawn from the shared txfee and deposit credit.
This happens if the passed gas inside the ethereum transaction is too low.
EvmConstructorNonEmptyData = 54
When calling an EVM constructor data has to be empty.
EVM constructors do not accept data. Their input data is part of the code blob itself.
EvmConstructedFromHash = 55
Tried to construct an EVM contract via code hash.
EVM contracts can only be instantiated via code upload as no initcode is stored on-chain.
StorageRefundNotEnoughFunds = 56
The contract does not have enough balance to refund the storage deposit.
This is a bug and should never happen. It means the accounting got out of sync.
StorageRefundLocked = 57
This means there are locks on the contracts storage deposit that prevents refunding it.
This would be the case if the contract used its storage deposits for governance or other pallets that allow creating locks over held balance.
PrecompileDelegateDenied = 64
Called a pre-compile that is not allowed to be delegate called.
Some pre-compile functions will trap the caller context if being delegate called or if their caller was being delegate called.
EcdsaRecoveryFailed = 65
ECDSA public key recovery failed. Most probably wrong recovery id or signature.
Trait Implementations§
Source§impl<T> Decode for Error<T>
impl<T> Decode for Error<T>
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Source§impl<T> Encode for Error<T>
impl<T> Encode for Error<T>
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl<T: Config> From<Error<T>> for Error
impl<T: Config> From<Error<T>> for Error
Source§fn from(error: CrateError<T>) -> Self
fn from(error: CrateError<T>) -> Self
Source§impl<T> PalletError for Error<T>
impl<T> PalletError for Error<T>
Source§const MAX_ENCODED_SIZE: usize = 1
const MAX_ENCODED_SIZE: usize = 1
impl<T> DecodeWithMemTracking for Error<T>
impl<T> EncodeLike for Error<T>
Auto Trait Implementations§
impl<T> Freeze for Error<T>
impl<T> RefUnwindSafe for Error<T>where
T: RefUnwindSafe,
impl<T> Send for Error<T>where
T: Send,
impl<T> Sync for Error<T>where
T: Sync,
impl<T> Unpin for Error<T>where
T: Unpin,
impl<T> UnwindSafe for Error<T>where
T: UnwindSafe,
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
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Source§impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
Source§impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
Source§fn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read moreSource§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.