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
↳
EvmTransactionLogDecoded
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
Name | Type | Description |
---|---|---|
value | EvmTransactionLogDecodedish | A valid EvmTransactionLogDecodedish |
Returns
Overrides
parse
▸ Static
parse(value
): EvmTransactionLogDecodedData
Parameters
Name | Type |
---|---|
value | EvmTransactionLogDecodedInput |
Returns
Overrides
equals
▸ equals(value
): boolean
Compares the log to another log for equality.
Example
log.equals(log);
Parameters
Name | Type | Description |
---|---|---|
value | EvmTransactionLogDecoded | The value to compare with |
Returns
boolean
true if the logs are equal, otherwise false
Inherited from
format
▸ format(): Object
Deprecated
This method will be removed soon. To format the value, use one of the properties.
Returns
Object
Name | Type |
---|---|
address | string |
blockHash | string |
blockNumber | number |
blockTimestamp? | string |
chain | string |
data | string |
logIndex? | number |
topics | (null | string )[] |
transactionHash | string |
transactionIndex? | number |
Inherited from
toJSON
▸ toJSON(): Object
Converts the log to a JSON object.
Example
log.toJSON();
Returns
Object
the EvmTransactionLog as a JSON object
Name | Type |
---|---|
address | string |
blockHash | string |
blockNumber | number |
blockTimestamp? | string |
chain | string |
data | string |
logIndex? | number |
topics | (null | string )[] |
transactionHash | string |
transactionIndex? | number |
Inherited from
Accessors
address
• get
address(): EvmAddress
Returns the address of the log.
Example
log.address; // EvmAddress
Returns
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
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
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
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
Name | Type |
---|---|
value | EvmTransactionLogDecodedInput |
Overrides
Properties
_value
• Protected
_value: EvmTransactionLogDecodedData