Contract
EventLog
An EventLog contains additional properties parsed from the Log.
Extends
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
address | readonly | string | The address of the contract that emitted this log. | Log .address |
args | readonly | Result | The parsed arguments passed to the event by emit . | - |
blockHash | readonly | string | The block hash of the block this log occurred in. Use the Log.getBlock to get the Block. | Log .blockHash |
blockNumber | readonly | number | The 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 |
data | readonly | string | The data included in this log when it was emitted. | Log .data |
fragment | readonly | EventFragment | The matching event. | - |
index | readonly | number | The 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 |
interface | readonly | Interface | The Contract Interface. | - |
provider | readonly | Provider | The provider connected to the log used to fetch additional details if necessary. | Log .provider |
removed | readonly | boolean | If 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 |
topics | readonly | readonly 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 |
transactionHash | readonly | string | The transaction hash of the transaction this log occurred in. Use the Log.getTransaction to get the **TransactionResponse. | Log .transactionHash |
transactionIndex | readonly | number | The index within the transaction of this log. | Log .transactionIndex |
Accessors
eventName
The name of the event.
Returns
string
Source
eventSignature
The signature of the event.
Returns
string
Source
Methods
getBlock()
Returns the block that this log occurred in.
Parameters
Parameter | Type | Description |
---|---|---|
shard | Shard | The shard to fetch the block from. |
Returns
Promise
<Block
>
A promise resolving to the block.
Inherited from
Source
getTransaction()
Returns the transaction that this log occurred in.
Returns
Promise
<TransactionResponse
>
A promise resolving to the transaction.
Inherited from
Source
getTransactionReceipt()
Returns the transaction receipt fot the transaction that this log occurred in.
Returns
Promise
<TransactionReceipt
>
A promise resolving to the transaction receipt.
Inherited from
Source
toJSON()
Returns a JSON-compatible object.
Returns
any
Inherited from
Source
Was this page helpful?