OriginCaller

Variant 160 v393

node_subtensor_runtime::OriginCaller

About This Type

Enum type: OriginCaller.

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

IndexNameFieldsDocs
0system
21Ethereum

SCALE Encoding

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

Examples

system = system(RawOrigin)
0x00<field0>
00 Variant index 0 = system
field 0 field0: RawOrigin
Ethereum = Ethereum(RawOrigin)
0x15<field0>
15 Variant index 21 = Ethereum
field 0 field0: RawOrigin

Code Examples

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

const registry = new TypeRegistry();

// Encode OriginCaller — variant "system"
const value = registry.createType("OriginCaller", { system: { value: 0 } });
console.log("Hex:", value.toHex());

Referenced By (3)

Type Information

Type ID
160
Kind
Variant
Path
node_subtensor_runtime::OriginCaller
Runtime
v393