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

InvalidScheduleVersion

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

InvalidSurchargeClaim

An origin must be signed or inherent and auxiliary sender only provided on inherent.

InvalidSourceContract

Cannot restore from nonexisting or tombstone contract.

InvalidDestinationContract

Cannot restore to nonexisting or alive contract.

InvalidTombstone

Tombstones don’t match.

InvalidContractOrigin

An origin TrieId written in the current block.

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 in order to allow for a tombstone to be created. Use seal_terminate to remove a contract without leaving a tombstone behind.

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.

ContractIsTombstone

A tombstone exist at the specified address.

Tombstone cannot be called. Anyone can use seal_restore_to in order to revive the contract, though.

RentNotPaid

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.

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 or `seal_restore_to.

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 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.

ContractNotEvictable

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.

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 or seal_restore_to.

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.

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