LayerLevel

Variant 540 v393

pallet_subtensor_swap::tick::LayerLevel

About This Type

Enum type: LayerLevel.

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
0Topnone
1Middlenone
2Bottomnone

SCALE Encoding

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

Examples

Top
0x00
00 Variant index 0 = Top
Middle
0x01
01 Variant index 1 = Middle
Bottom
0x02
02 Variant index 2 = Bottom

Code Examples

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

const registry = new TypeRegistry();

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

Referenced By (1)

Type Information

Type ID
540
Kind
Variant
Path
pallet_subtensor_swap::tick::LayerLevel
Runtime
v393