Enum pallet_contracts::pallet::Error[][src]

pub enum Error<T> {
Show 26 variants InvalidScheduleVersion, OutOfGas, OutputBufferTooSmall, BelowSubsistenceThreshold, NewContractNotFunded, TransferFailed, MaxCallDepthReached, ContractNotFound, CodeTooLarge, CodeNotFound, OutOfBounds, DecodingFailed, ContractTrapped, ValueTooLarge, TerminatedWhileReentrant, InputForwarded, RandomSubjectTooLong, TooManyTopics, DuplicateTopics, NoChainExtension, DeletionQueueFull, StorageExhausted, DuplicateContract, TerminatedInConstructor, DebugMessageInvalidUTF8, ReentranceDenied, // some variants omitted
}
Expand description

Custom dispatch errors of this pallet.

Variants

InvalidScheduleVersion

A new schedule must have a greater version than the current one.

OutOfGas

The executed contract exhausted its gas limit.

OutputBufferTooSmall

The output buffer supplied to a contract API call was too small.

BelowSubsistenceThreshold

Performing the requested transfer would have brought the contract below the subsistence threshold. No transfer is allowed to do this. Use seal_terminate to recover a deposit.

NewContractNotFunded

The newly created contract is below the subsistence threshold after executing its contructor. No contracts are allowed to exist below that threshold.

TransferFailed

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.

MaxCallDepthReached

Performing a call was denied because the calling depth reached the limit of what is specified in the schedule.

ContractNotFound

No contract was found at the specified address.

CodeTooLarge

The code supplied to instantiate_with_code exceeds the limit specified in the current schedule.

CodeNotFound

No code could be found at the supplied code hash.

OutOfBounds

A buffer outside of sandbox memory was passed to a contract API function.

DecodingFailed

Input passed to a contract API function failed to decode as expected type.

ContractTrapped

Contract trapped during execution.

ValueTooLarge

The size defined in T::MaxValueSize was exceeded.

TerminatedWhileReentrant

Termination of a contract is not allowed while the contract is already on the call stack. Can be triggered by seal_terminate.

InputForwarded

seal_call forwarded this contracts input. It therefore is no longer available.

RandomSubjectTooLong

The subject passed to seal_random exceeds the limit.

TooManyTopics

The amount of topics passed to seal_deposit_events exceeds the limit.

DuplicateTopics

The topics passed to seal_deposit_events contains at least one duplicate.

NoChainExtension

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.

DeletionQueueFull

Removal of a contract failed because the deletion queue is full.

This can happen when calling 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.

StorageExhausted

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.

DuplicateContract

A contract with the same AccountId already exists.

TerminatedInConstructor

A contract self destructed in its constructor.

This can be triggered by a call to seal_terminate.

DebugMessageInvalidUTF8

The debug message specified to seal_debug_message does contain invalid UTF-8.

ReentranceDenied

A call tried to invoke a contract that is flagged as non-reentrant.

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

The type identifying for which type info is provided. Read more

Returns the static type identifier for Self.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert from a value of T into an equivalent instance of Option<Self>. Read more

Consume self to return Some equivalent value of Option<T>. Read more

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

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

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

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Cast reference.

Cast reference.

Cast mutable reference.

Cast mutable reference.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Should always be Self

Convert from a value of T into an equivalent instance of Self. Read more

Consume self to return an equivalent value of T. Read more

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.

Consume self to return an equivalent value of T.

Call this on your modules custom errors type in order to return a custom weight on error. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more