HoldReason

Variant 168 v411

pallet_safe_mode::pallet::HoldReason

About This Type

Enum type: HoldReason.

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 (1)

IndexNameFieldsDocs
0EnterOrExtendnone

SCALE Encoding

Rule
1-byte variant selects the address format, followed by format-specific data.
Size
variable (1–33 bytes)

Examples

Id variant (AccountId32) = Id(5Grw...QY)
0x00d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d
00 Variant 0 = Id
d43593c7...56da27d 32-byte AccountId32

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode HoldReason — variant "EnterOrExtend"
const value = registry.createType("HoldReason", "EnterOrExtend");
console.log("Hex:", value.toHex());

Referenced By (4)

Type Information

Type ID
168
Kind
Variant
Path
pallet_safe_mode::pallet::HoldReason
Runtime
v411