RuntimeError

Variant 726 v393

node_subtensor_runtime::RuntimeError

About This Type

Enum type: RuntimeError.

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

IndexNameFieldsDocs
0System
4Grandpa
5Balances
7SubtensorModule
11Utility
12Sudo
13Multisig
14Preimage
15Scheduler
16Proxy
17Registry
18Commitments
19AdminUtils
20SafeMode
21Ethereum
22EVM
26Drand
27Crowdloan
28Swap
29Contracts
30MevShield

SCALE Encoding

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

Examples

System = System(Error)
0x00<field0>
00 Variant index 0 = System
field 0 field0: Error
Grandpa = Grandpa(Error)
0x04<field0>
04 Variant index 4 = Grandpa
field 0 field0: Error
Balances = Balances(Error)
0x05<field0>
05 Variant index 5 = Balances
field 0 field0: Error

Code Examples

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

const registry = new TypeRegistry();

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

Type Information

Type ID
726
Kind
Variant
Path
node_subtensor_runtime::RuntimeError
Runtime
v393