Preimage::Error
Variant 460 v411pallet_preimage::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 (8)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | TooBig | none | Preimage is too large to store on-chain. |
| 1 | AlreadyNoted | none | Preimage has already been noted on-chain. |
| 2 | NotAuthorized | none | The user is not authorized to perform this action. |
| 3 | NotNoted | none | The preimage cannot be removed since it has not yet been noted. |
| 4 | Requested | none | A preimage may not be removed when there are outstanding requests. |
| 5 | NotRequested | none | The preimage request cannot be removed since no outstanding requests exist. |
| 6 | TooMany | none | More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once. |
| 7 | TooFew | none | Too few hashes were requested to be upgraded (i.e. zero). |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 8 possible variants.
- Size
- variable (1+ bytes)
Examples
TooBig
0x0000 Variant index 0 = TooBigAlreadyNoted
0x0101 Variant index 1 = AlreadyNotedNotAuthorized
0x0202 Variant index 2 = NotAuthorizedCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Preimage::Error — variant "TooBig"
const value = registry.createType("Preimage::Error", "TooBig");
console.log("Hex:", value.toHex());Type Parameters
T
Also See
Type Information
- Type ID
- 460
- Kind
- Variant
- Path
- pallet_preimage::pallet::Error
- Runtime
- v411