Percent
Composite 157 v393sp_arithmetic::per_things::Percent
About This Type
Structured type: Percent.
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 (1)
| # | Name | Type |
|---|---|---|
| 0 | (unnamed) | u8 |
SCALE Encoding
- Rule
- 1 field encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 1 field = ?: u8
0x<field0>field 0 field0: u8Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Percent
const value = registry.createType("Percent", {
field: 42
});
console.log("Hex:", value.toHex());Referenced By (2)
Type Information
- Type ID
- 157
- Kind
- Composite
- Path
- sp_arithmetic::per_things::Percent
- Runtime
- v393