Environment

Composite 555 v393

pallet_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)

#NameType
0account_idEnvironmentType
1balanceEnvironmentType
2hashEnvironmentType
3hasherEnvironmentType
4timestampEnvironmentType
5block_numberEnvironmentType

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: EnvironmentType
field 1 balance: EnvironmentType
field 2 hash: EnvironmentType
field 3 hasher: EnvironmentType
field 4 timestamp: EnvironmentType
field 5 block_number: EnvironmentType

Code 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