An EventLog contains additional properties parsed from the Log.

Extends

Properties

PropertyModifierTypeDescriptionInherited from
addressreadonlystringThe address of the contract that emitted this log.Log.address
argsreadonlyResultThe parsed arguments passed to the event by emit.-
blockHashreadonlystringThe block hash of the block this log occurred in. Use the Log.getBlock to get the
Block.
Log.blockHash
blockNumberreadonlynumberThe block number of the block this log occurred in. It is preferred to use the Block.hash | Block.hash
when fetching the related Block, since in the case of an orphaned block, the block at that
height may have changed.
Log.blockNumber
datareadonlystringThe data included in this log when it was emitted.Log.data
fragmentreadonlyEventFragmentThe matching event.-
indexreadonlynumberThe index within the block this log occurred at. This is generally not useful to developers, but can be used with
the various roots to proof inclusion within a block.
Log.index
interfacereadonlyInterfaceThe Contract Interface.-
providerreadonlyProviderThe provider connected to the log used to fetch additional details if necessary.Log.provider
removedreadonlybooleanIf the Log represents a block that was removed due to an orphaned block, this will be true.

This can only happen within an orphan event listener.
Log.removed
topicsreadonlyreadonly string[]The indexed topics included in this log when it was emitted.

All topics are included in the bloom filters, so they can be efficiently filtered using the
Provider.getLogs method.
Log.topics
transactionHashreadonlystringThe transaction hash of the transaction this log occurred in. Use the
Log.getTransaction to get the
**TransactionResponse.
Log.transactionHash
transactionIndexreadonlynumberThe index within the transaction of this log.Log.transactionIndex

Accessors

eventName

get eventName(): string

The name of the event.

Returns

string

Source

contract/wrappers.ts:47


eventSignature

get eventSignature(): string

The signature of the event.

Returns

string

Source

contract/wrappers.ts:54

Methods

getBlock()

getBlock(shard): Promise<Block>

Returns the block that this log occurred in.

Parameters

ParameterTypeDescription
shardShardThe shard to fetch the block from.

Returns

Promise<Block>

A promise resolving to the block.

Inherited from

Log.getBlock

Source

providers/provider.ts:1090


getTransaction()

getTransaction(): Promise<TransactionResponse>

Returns the transaction that this log occurred in.

Returns

Promise<TransactionResponse>

A promise resolving to the transaction.

Inherited from

Log.getTransaction

Source

providers/provider.ts:1101


getTransactionReceipt()

getTransactionReceipt(): Promise<TransactionReceipt>

Returns the transaction receipt fot the transaction that this log occurred in.

Returns

Promise<TransactionReceipt>

A promise resolving to the transaction receipt.

Inherited from

Log.getTransactionReceipt

Source

providers/provider.ts:1112


toJSON()

toJSON(): any

Returns a JSON-compatible object.

Returns

any

Inherited from

Log.toJSON

Source

providers/provider.ts:1066