RootClaimTypeEnum

Variant 53 v393

pallet_subtensor::pallet::RootClaimTypeEnum

About This Type

Enum type: RootClaimTypeEnum.

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)

IndexNameFieldsDocs
0Swapnone
1Keepnone
2KeepSubnets
subnets: BTreeSet

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 3 possible variants.
Size
variable (1+ bytes)

Examples

Swap
0x00
00 Variant index 0 = Swap
Keep
0x01
01 Variant index 1 = Keep
KeepSubnets = KeepSubnets(subnets)
0x02<field0>
02 Variant index 2 = KeepSubnets
field 0 subnets: BTreeSet

Code Examples

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

const registry = new TypeRegistry();

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

Referenced By (2)

Type Information

Type ID
53
Kind
Variant
Path
pallet_subtensor::pallet::RootClaimTypeEnum
Runtime
v393