ContractAccessError
Variant 627 v393pallet_contracts::primitives::ContractAccessError
About This Type
Enum type: ContractAccessError.
A tagged union where the first byte selects which variant is active, followed by that variant's data.
Encoding: 1-byte variant index followed by the selected variant's field data.
Variants (3)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | DoesntExist | none | |
| 1 | KeyDecodingFailed | none | |
| 2 | MigrationInProgress | none |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 3 possible variants.
- Size
- variable (1+ bytes)
Examples
DoesntExist
0x0000 Variant index 0 = DoesntExistKeyDecodingFailed
0x0101 Variant index 1 = KeyDecodingFailedMigrationInProgress
0x0202 Variant index 2 = MigrationInProgressCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode ContractAccessError — variant "DoesntExist"
const value = registry.createType("ContractAccessError", "DoesntExist");
console.log("Hex:", value.toHex());Referenced By (1)
Type Information
- Type ID
- 627
- Kind
- Variant
- Path
- pallet_contracts::primitives::ContractAccessError
- Runtime
- v393