Contracts::Error
Variant 563 v393pallet_contracts::pallet::Error
The `Error` enum of this pallet.
About This Type
Error enum for the Error pallet.
Contains all error types that the Error pallet can return when a call fails.
Variants (37)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | InvalidSchedule | none | Invalid schedule supplied, e.g. with zero weight of a basic operation. |
| 1 | InvalidCallFlags | none | Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`. |
| 2 | OutOfGas | none | The executed contract exhausted its gas limit. |
| 3 | OutputBufferTooSmall | none | The output buffer supplied to a contract API call was too small. |
| 4 | TransferFailed | none | Performing the requested transfer failed. Probably because there isn't enough free balance in the sender's account. |
| 5 | MaxCallDepthReached | none | Performing a call was denied because the calling depth reached the limit of what is specified in the schedule. |
| 6 | ContractNotFound | none | No contract was found at the specified address. |
| 7 | CodeTooLarge | none | The code supplied to `instantiate_with_code` exceeds the limit specified in the current schedule. |
| 8 | CodeNotFound | none | No code could be found at the supplied code hash. |
| 9 | CodeInfoNotFound | none | No code info could be found at the supplied code hash. |
| 10 | OutOfBounds | none | A buffer outside of sandbox memory was passed to a contract API function. |
| 11 | DecodingFailed | none | Input passed to a contract API function failed to decode as expected type. |
| 12 | ContractTrapped | none | Contract trapped during execution. |
| 13 | ValueTooLarge | none | The size defined in `T::MaxValueSize` was exceeded. |
| 14 | TerminatedWhileReentrant | none | Termination of a contract is not allowed while the contract is already on the call stack. Can be triggered by `seal_terminate`. |
| 15 | InputForwarded | none | `seal_call` forwarded this contracts input. It therefore is no longer available. |
| 16 | RandomSubjectTooLong | none | The subject passed to `seal_random` exceeds the limit. |
| 17 | TooManyTopics | none | The amount of topics passed to `seal_deposit_events` exceeds the limit. |
| 18 | NoChainExtension | none | 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. |
| 19 | XCMDecodeFailed | none | Failed to decode the XCM program. |
| 20 | DuplicateContract | none | A contract with the same AccountId already exists. |
| 21 | TerminatedInConstructor | none | A contract self destructed in its constructor. This can be triggered by a call to `seal_terminate`. |
| 22 | ReentranceDenied | none | A call tried to invoke a contract that is flagged as non-reentrant. The only other cause is that a call from a contract into the runtime tried to call back into `pallet-contracts`. This would make the whole pallet reentrant with regard to contract code execution which is not supported. |
| 23 | StateChangeDenied | none | A contract attempted to invoke a state modifying API while being in read-only mode. |
| 24 | StorageDepositNotEnoughFunds | none | Origin doesn't have enough balance to pay the required storage deposits. |
| 25 | StorageDepositLimitExhausted | none | More storage was created than allowed by the storage deposit limit. |
| 26 | CodeInUse | none | Code removal was denied because the code is still in use by at least one contract. |
| 27 | ContractReverted | none | 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. |
| 28 | CodeRejected | none | The contract's code was found to be invalid during validation. The most likely cause of this is that an API was used which is not supported by the node. This happens if an older node is used with a new version of ink!. Try updating your node to the newest available version. A more detailed error can be found on the node console if debug messages are enabled by supplying `-lruntime::contracts=debug`. |
| 29 | Indeterministic | none | An indeterministic code was used in a context where this is not permitted. |
| 30 | MigrationInProgress | none | A pending migration needs to complete before the extrinsic can be called. |
| 31 | NoMigrationPerformed | none | Migrate dispatch call was attempted but no migration was performed. |
| 32 | MaxDelegateDependenciesReached | none | The contract has reached its maximum number of delegate dependencies. |
| 33 | DelegateDependencyNotFound | none | The dependency was not found in the contract's delegate dependencies. |
| 34 | DelegateDependencyAlreadyExists | none | The contract already depends on the given delegate dependency. |
| 35 | CannotAddSelfAsDelegateDependency | none | Can not add a delegate dependency to the code hash of the contract itself. |
| 36 | OutOfTransientStorage | none | Can not add more data to transient storage. |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 37 possible variants.
- Size
- variable (1+ bytes)
Examples
InvalidSchedule
0x0000 Variant index 0 = InvalidScheduleInvalidCallFlags
0x0101 Variant index 1 = InvalidCallFlagsOutOfGas
0x0202 Variant index 2 = OutOfGasCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Contracts::Error — variant "InvalidSchedule"
const value = registry.createType("Contracts::Error", "InvalidSchedule");
console.log("Hex:", value.toHex());Type Parameters
T
Referenced By (21)
#726 RuntimeError via System#726 RuntimeError via Grandpa#726 RuntimeError via Balances#726 RuntimeError via SubtensorModule#726 RuntimeError via Utility#726 RuntimeError via Sudo#726 RuntimeError via Multisig#726 RuntimeError via Preimage#726 RuntimeError via Scheduler#726 RuntimeError via Proxy#726 RuntimeError via Registry#726 RuntimeError via Commitments#726 RuntimeError via AdminUtils#726 RuntimeError via SafeMode#726 RuntimeError via Ethereum#726 RuntimeError via EVM#726 RuntimeError via Drand#726 RuntimeError via Crowdloan#726 RuntimeError via Swap#726 RuntimeError via Contracts
and 1 more...
Also See
Type Information
- Type ID
- 563
- Kind
- Variant
- Path
- pallet_contracts::pallet::Error
- Runtime
- v393