Enum pallet_contracts::pallet::Error [−][src]
pub enum Error<T> {}Show variants
InvalidScheduleVersion, InvalidSurchargeClaim, InvalidSourceContract, InvalidDestinationContract, InvalidTombstone, InvalidContractOrigin, OutOfGas, OutputBufferTooSmall, BelowSubsistenceThreshold, NewContractNotFunded, TransferFailed, MaxCallDepthReached, ContractNotFound, ContractIsTombstone, RentNotPaid, CodeTooLarge, CodeNotFound, OutOfBounds, DecodingFailed, ContractTrapped, ValueTooLarge, TerminatedWhileReentrant, InputForwarded, RandomSubjectTooLong, TooManyTopics, DuplicateTopics, NoChainExtension, DeletionQueueFull, ContractNotEvictable, StorageExhausted, DuplicateContract, TerminatedInConstructor, DebugMessageInvalidUTF8, ReentranceDenied, // some variants omitted
Expand description
Custom dispatch errors of this pallet.
Variants
A new schedule must have a greater version than the current one.
An origin must be signed or inherent and auxiliary sender only provided on inherent.
Cannot restore from nonexisting or tombstone contract.
Cannot restore to nonexisting or alive contract.
Tombstones don’t match.
An origin TrieId written in the current block.
The executed contract exhausted its gas limit.
The output buffer supplied to a contract API call was too small.
Performing the requested transfer would have brought the contract below
the subsistence threshold. No transfer is allowed to do this in order to allow
for a tombstone to be created. Use seal_terminate
to remove a contract without
leaving a tombstone behind.
The newly created contract is below the subsistence threshold after executing its contructor. No contracts are allowed to exist below that threshold.
Performing the requested transfer failed for a reason originating in the chosen currency implementation of the runtime. Most probably the balance is too low or locks are placed on it.
Performing a call was denied because the calling depth reached the limit of what is specified in the schedule.
No contract was found at the specified address.
A tombstone exist at the specified address.
Tombstone cannot be called. Anyone can use seal_restore_to
in order to revive
the contract, though.
The called contract does not have enough balance to pay for its storage.
The contract ran out of balance and is therefore eligible for eviction into a
tombstone. Anyone can evict the contract by submitting a claim_surcharge
extrinsic. Alternatively, a plain balance transfer can be used in order to
increase the contracts funds so that it can be called again.
The code supplied to instantiate_with_code
exceeds the limit specified in the
current schedule.
No code could be found at the supplied code hash.
A buffer outside of sandbox memory was passed to a contract API function.
Input passed to a contract API function failed to decode as expected type.
Contract trapped during execution.
The size defined in T::MaxValueSize
was exceeded.
Termination of a contract is not allowed while the contract is already
on the call stack. Can be triggered by seal_terminate
or `seal_restore_to.
seal_call
forwarded this contracts input. It therefore is no longer available.
The subject passed to seal_random
exceeds the limit.
The amount of topics passed to seal_deposit_events
exceeds the limit.
The topics passed to seal_deposit_events
contains at least one duplicate.
The chain does not provide a chain extension. Calling the chain extension results in this error. Note that this usually shouldn’t happen as deploying such contracts is rejected.
Removal of a contract failed because the deletion queue is full.
This can happen when either calling Pallet::claim_surcharge
or seal_terminate
.
The queue is filled by deleting contracts and emptied by a fixed amount each block.
Trying again during another block is the only way to resolve this issue.
A contract could not be evicted because it has enough balance to pay rent.
This can be returned from Pallet::claim_surcharge
because the target
contract has enough balance to pay for its rent.
A storage modification exhausted the 32bit type that holds the storage size.
This can either happen when the accumulated storage in bytes is too large or when number of storage items is too large.
A contract with the same AccountId already exists.
A contract self destructed in its constructor.
This can be triggered by a call to seal_terminate
or seal_restore_to
.
The debug message specified to seal_debug_message
does contain invalid UTF-8.
A call tried to invoke a contract that is flagged as non-reentrant.
Implementations
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Error<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Error<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
Call this on your modules custom errors type in order to return a custom weight on error. Read more
impl<T> MaybeDebug for T where
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,