Skip to main content

Class: EvmTransactionLogDecoded

moralis-monorepo / @moralisweb3/common-evm-utils / EvmTransactionLogDecoded

Class: EvmTransactionLogDecoded

@moralisweb3/common-evm-utils.EvmTransactionLogDecoded

The EvmTransactionLogDecoded class is a MoralisData that references an EVM decoded transaction log.

Hierarchy

Table of contents

Methods

Accessors

Constructors

Properties

Methods

create

Static create(value): EvmTransactionLogDecoded

Create a new instance of EvmTransactionLogDecoded from any valid address input

Example

const log = EvmTransactionLogDecoded.create(value, core);

Parameters

NameTypeDescription
valueEvmTransactionLogDecodedishA valid EvmTransactionLogDecodedish

Returns

EvmTransactionLogDecoded

Overrides

EvmTransactionLog.create


parse

Static parse(value): EvmTransactionLogDecodedData

Parameters

NameType
valueEvmTransactionLogDecodedInput

Returns

EvmTransactionLogDecodedData

Overrides

EvmTransactionLog.parse


equals

equals(value): boolean

Compares the log to another log for equality.

Example

log.equals(log);

Parameters

NameTypeDescription
valueEvmTransactionLogDecodedThe value to compare with

Returns

boolean

true if the logs are equal, otherwise false

Inherited from

EvmTransactionLog.equals


format

format(): Object

Deprecated

This method will be removed soon. To format the value, use one of the properties.

Returns

Object

NameType
addressstring
blockHashstring
blockNumbernumber
blockTimestamp?string
chainstring
datastring
logIndex?number
topics(null | string)[]
transactionHashstring
transactionIndex?number

Inherited from

EvmTransactionLog.format


toJSON

toJSON(): Object

Converts the log to a JSON object.

Example

log.toJSON();

Returns

Object

the EvmTransactionLog as a JSON object

NameType
addressstring
blockHashstring
blockNumbernumber
blockTimestamp?string
chainstring
datastring
logIndex?number
topics(null | string)[]
transactionHashstring
transactionIndex?number

Inherited from

EvmTransactionLog.toJSON

Accessors

address

get address(): EvmAddress

Returns the address of the log.

Example

log.address; // EvmAddress

Returns

EvmAddress

Inherited from

EvmTransactionLog.address


blockHash

get blockHash(): string

Example

log.blockHash; // "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171"

Returns

string

the block hash of the log.

Inherited from

EvmTransactionLog.blockHash


blockNumber

get blockNumber(): number

Example

log.blockNumber; // 12386788

Returns

number

the block number of the log.

Inherited from

EvmTransactionLog.blockNumber


blockTimestamp

get blockTimestamp(): undefined | string

Example

log.blockTimestamp; // "2021-05-07T11:08:35.000Z"

Returns

undefined | string

the block timestamp of the log.

Inherited from

EvmTransactionLog.blockTimestamp


chain

get chain(): EvmChain

Returns the chain of the log.

Example

log.chain; // EvmChain

Returns

EvmChain

Inherited from

EvmTransactionLog.chain


data

get data(): string

Example

log.data; // "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443"

Returns

string

the data of the log.

Inherited from

EvmTransactionLog.data


decodedEvent

get decodedEvent(): EvmTransactionLogDecodedEvent

Returns

EvmTransactionLogDecodedEvent


logIndex

get logIndex(): undefined | number

Example

log.logIndex; // 273

Returns

undefined | number

the log index of the log.

Inherited from

EvmTransactionLog.logIndex


result

get result(): EvmTransactionLogData

Returns the processed Erc20Token.

Example

log.result;

Returns

EvmTransactionLogData

the EvmTransactionLog value

Inherited from

EvmTransactionLog.result


topics

get topics(): (null | string)[]

Example

log.topic0; // ["0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002"]

Returns

(null | string)[]

the topics of the log.

Inherited from

EvmTransactionLog.topics


transactionHash

get transactionHash(): string

Example

log.transactionHash; // "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5"

Returns

string

the transaction hash of the log.

Inherited from

EvmTransactionLog.transactionHash

Constructors

constructor

new EvmTransactionLogDecoded(value)

Parameters

NameType
valueEvmTransactionLogDecodedInput

Overrides

EvmTransactionLog.constructor

Properties

_value

Protected _value: EvmTransactionLogDecodedData

Overrides

EvmTransactionLog._value