Log

Composite 84 v393

ethereum::log::Log

About This Type

Structured type: Log.

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
0addressH160
1topicsVec<H256>
2dataVec<u8>

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 = address: H160, topics: Vec<H256>, data: Vec<u8>
0x<field0><field1><field2>
field 0 address: H160
field 1 topics: Vec<H256>
field 2 data: Vec<u8>

Code Examples

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

const registry = new TypeRegistry();

// Encode Log
const value = registry.createType("Log", {
  address: 0,
  topics: 0,
  data: 0
});
console.log("Hex:", value.toHex());

Referenced By (2)

Type Information

Type ID
84
Kind
Composite
Path
ethereum::log::Log
Runtime
v393