Environment
Composite 555 v393pallet_contracts::Environment
About This Type
Structured type: Environment.
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 (6)
| # | Name | Type |
|---|---|---|
| 0 | account_id | EnvironmentType |
| 1 | balance | EnvironmentType |
| 2 | hash | EnvironmentType |
| 3 | hasher | EnvironmentType |
| 4 | timestamp | EnvironmentType |
| 5 | block_number | EnvironmentType |
SCALE Encoding
- Rule
- 6 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 6 fields = account_id: EnvironmentType, balance: EnvironmentType, hash: EnvironmentType, hasher: EnvironmentType, timestamp: EnvironmentType, block_number: EnvironmentType
0x<field0><field1><field2><field3><field4><field5>field 0 account_id: EnvironmentTypefield 1 balance: EnvironmentTypefield 2 hash: EnvironmentTypefield 3 hasher: EnvironmentTypefield 4 timestamp: EnvironmentTypefield 5 block_number: EnvironmentTypeCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Environment
const value = registry.createType("Environment", {
account_id: 0,
balance: 0,
hash: 0,
hasher: 0,
timestamp: 0,
block_number: 0
});
console.log("Hex:", value.toHex());Type Parameters
T
Type Information
- Type ID
- 555
- Kind
- Composite
- Path
- pallet_contracts::Environment
- Runtime
- v393