RootClaimTypeEnum
Variant 53 v393pallet_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)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | Swap | none | |
| 1 | Keep | none | |
| 2 | KeepSubnets | subnets: BTreeSet |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 3 possible variants.
- Size
- variable (1+ bytes)
Examples
Swap
0x0000 Variant index 0 = SwapKeep
0x0101 Variant index 1 = KeepKeepSubnets = KeepSubnets(subnets)
0x02<field0>02 Variant index 2 = KeepSubnetsfield 0 subnets: BTreeSetCode 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