RuntimeHoldReason
Variant 413 v393node_subtensor_runtime::RuntimeHoldReason
About This Type
Enum type: RuntimeHoldReason.
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 (4)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 14 | Preimage | ||
| 17 | Registry | ||
| 20 | SafeMode | ||
| 29 | Contracts |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 4 possible variants.
- Size
- variable (1+ bytes)
Examples
Preimage = Preimage(HoldReason)
0x0e<field0>0e Variant index 14 = Preimagefield 0 field0: HoldReasonRegistry = Registry(HoldReason)
0x11<field0>11 Variant index 17 = Registryfield 0 field0: HoldReasonSafeMode = SafeMode(HoldReason)
0x14<field0>14 Variant index 20 = SafeModefield 0 field0: HoldReasonCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode RuntimeHoldReason — variant "Preimage"
const value = registry.createType("RuntimeHoldReason", { Preimage: { value: 0 } });
console.log("Hex:", value.toHex());Referenced By (1)
Type Information
- Type ID
- 413
- Kind
- Variant
- Path
- node_subtensor_runtime::RuntimeHoldReason
- Runtime
- v393