PerDispatchClass

Composite 111 v393

frame_support::dispatch::PerDispatchClass

About This Type

Structured type: PerDispatchClass.

A struct-like type where each field is encoded in declaration order.

Encoding: Fields encoded consecutively in declaration order, no field names or separators.

Fields (3)

#NameType
0normalWeightsPerClass
1operationalWeightsPerClass
2mandatoryWeightsPerClass

SCALE Encoding

Rule
3 fields encoded consecutively in declaration order. No field names or delimiters.
Size
sum of field sizes

Examples

Struct with 3 fields = normal: WeightsPerClass, operational: WeightsPerClass, mandatory: WeightsPerClass
0x<field0><field1><field2>
field 0 normal: WeightsPerClass
field 1 operational: WeightsPerClass
field 2 mandatory: WeightsPerClass

Code Examples

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

const registry = new TypeRegistry();

// Encode PerDispatchClass
const value = registry.createType("PerDispatchClass", {
  normal: 0,
  operational: 0,
  mandatory: 0
});
console.log("Hex:", value.toHex());

Type Parameters

T = WeightsPerClass

Referenced By (2)

Type Information

Type ID
111
Kind
Composite
Path
frame_support::dispatch::PerDispatchClass
Runtime
v393