Skip to content

Log

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:461

A Log in Ethereum represents an event that has been included in a transaction using the LOG* opcodes, which are most commonly used by Solidity’s emit for announcing events.

new Log(log, provider): Log;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:519

@_ignore:

ParameterType
logLogParams
providerProvider

Log

readonly address: string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:494

The address of the contract that emitted this log.

LogParams.address


readonly blockHash: string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:476

The block hash of the block this log occurred in. Use the [[Log-getBlock]] to get the [[Block]].

LogParams.blockHash


readonly blockNumber: number;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:483

The block number of the block this log occurred in. It is preferred to use the [[Block-hash]] when fetching the related [[Block]], since in the case of an orphaned block, the block at that height may have changed.

LogParams.blockNumber


readonly data: string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:498

The data included in this log when it was emitted.

LogParams.data


readonly index: number;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:511

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.

LogParams.index


readonly provider: Provider;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:466

The provider connected to the log used to fetch additional details if necessary.


readonly removed: boolean;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:490

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.

LogParams.removed


readonly topics: readonly string[];

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:505

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.

LogParams.topics


readonly transactionHash: string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:471

The transaction hash of the transaction this log occurred in. Use the [[Log-getTransaction]] to get the [[TransactionResponse]].

LogParams.transactionHash


readonly transactionIndex: number;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:515

The index within the transaction of this log.

LogParams.transactionIndex

getBlock(): Promise<Block>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:527

Returns the block that this log occurred in.

Promise<Block>


getTransaction(): Promise<TransactionResponse>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:531

Returns the transaction that this log occurred in.

Promise<TransactionResponse>


getTransactionReceipt(): Promise<TransactionReceipt>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:536

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

Promise<TransactionReceipt>


removedEvent(): OrphanFilter;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:540

@_ignore:

OrphanFilter


toJSON(): any;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:523

Returns a JSON-compatible object.

any