Bounded
Variant 485 v393frame_support::traits::preimages::Bounded
About This Type
Enum type: Bounded.
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 | Legacy | hash: H256 | |
| 1 | Inline | ||
| 2 | Lookup |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 3 possible variants.
- Size
- variable (1+ bytes)
Examples
Legacy = Legacy(hash)
0x00<field0>00 Variant index 0 = Legacyfield 0 hash: H256Inline = Inline(BoundedVec)
0x01<field0>01 Variant index 1 = Inlinefield 0 field0: BoundedVecLookup = Lookup(hash, len)
0x02<field0><field1>02 Variant index 2 = Lookupfield 0 hash: H256field 1 len: u32Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Bounded — variant "Legacy"
const value = registry.createType("Bounded", { Legacy: { hash: 0 } });
console.log("Hex:", value.toHex());Type Parameters
T = RuntimeCall
H = BlakeTwo256
Referenced By (2)
Type Information
- Type ID
- 485
- Kind
- Variant
- Path
- frame_support::traits::preimages::Bounded
- Runtime
- v393