Block
Composite 374 v393sp_runtime::generic::block::Block
About This Type
Structured type: Block.
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 (2)
| # | Name | Type |
|---|---|---|
| 0 | header | Header |
| 1 | extrinsics | Vec<UncheckedExtrinsic> |
SCALE Encoding
- Rule
- 2 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 2 fields = header: Header, extrinsics: Vec<UncheckedExtrinsic>
0x<field0><field1>field 0 header: Headerfield 1 extrinsics: Vec<UncheckedExtrinsic>Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Block
const value = registry.createType("Block", {
header: 0,
extrinsics: 0
});
console.log("Hex:", value.toHex());Type Parameters
Header = Header
Extrinsic = UncheckedExtrinsic
Referenced By (1)
Type Information
- Type ID
- 374
- Kind
- Composite
- Path
- sp_runtime::generic::block::Block
- Runtime
- v393