Skip to content

ContractTransactionReceipt

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/wrappers.d.ts:54

A ContractTransactionReceipt includes the parsed logs from a [[TransactionReceipt]].

new ContractTransactionReceipt(
iface,
provider,
tx): ContractTransactionReceipt;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/wrappers.d.ts:59

@_ignore:

ParameterType
ifaceInterface
providerProvider
txTransactionReceipt

ContractTransactionReceipt

TransactionReceipt.constructor

readonly blobGasPrice: null | bigint;

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

The price paid per BLOB in gas. See [[link-eip-4844]].

TransactionReceipt.blobGasPrice


readonly blobGasUsed: null | bigint;

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

The gas used for BLObs. See [[link-eip-4844]].

TransactionReceipt.blobGasUsed


readonly blockHash: string;

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

The block hash of the [[Block]] this transaction was included in.

TransactionReceipt.blockHash


readonly blockNumber: number;

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

The block number of the [[Block]] this transaction was included in.

TransactionReceipt.blockNumber


readonly contractAddress: null | string;

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

The address of the contract if the transaction was directly responsible for deploying one.

This is non-null only if the to is empty and the data was successfully executed as initcode.

TransactionReceipt.contractAddress


readonly cumulativeGasUsed: bigint;

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

The amount of gas used by all transactions within the block for this and all transactions with a lower index.

This is generally not useful for developers but can be used to validate certain aspects of execution.

TransactionReceipt.cumulativeGasUsed


readonly from: string;

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

The sender of the transaction.

TransactionReceipt.from


readonly gasPrice: bigint;

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

The actual gas price used during execution.

Due to the complexity of [[link-eip-1559]] this value can only be caluclated after the transaction has been mined, snce the base fee is protocol-enforced.

TransactionReceipt.gasPrice


readonly gasUsed: bigint;

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

The actual amount of gas used by this transaction.

When creating a transaction, the amount of gas that will be used can only be approximated, but the sender must pay the gas fee for the entire gas limit. After the transaction, the difference is refunded.

TransactionReceipt.gasUsed


readonly hash: string;

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

The transaction hash.

TransactionReceipt.hash


readonly index: number;

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

The index of this transaction within the block transactions.

TransactionReceipt.index


readonly logsBloom: string;

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

The bloom filter bytes that represent all logs that occurred within this transaction. This is generally not useful for most developers, but can be used to validate the included logs.

TransactionReceipt.logsBloom


readonly provider: Provider;

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

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

TransactionReceipt.provider


readonly root: null | string;

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

The root hash of this transaction.

This is no present and was only included in pre-byzantium blocks, but could be used to validate certain parts of the receipt.

TransactionReceipt.root


readonly status: null | number;

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

The status of this transaction, indicating success (i.e. 1) or a revert (i.e. 0).

This is available in post-byzantium blocks, but some backends may backfill this value.

TransactionReceipt.status


readonly to: null | string;

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

The address the transaction was sent to.

TransactionReceipt.to


readonly type: number;

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

The [[link-eip-2718]] transaction type.

TransactionReceipt.type

get fee(): bigint;

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

The total fee for this transaction, in wei.

bigint

TransactionReceipt.fee


get length(): number;

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

@_ignore:

number

TransactionReceipt.length


get logs(): (
| Log
| EventLog)[];

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/wrappers.d.ts:64

The parsed logs for any [[Log]] which has a matching event in the Contract ABI.

( | Log | EventLog)[]

The logs emitted during the execution of this transaction.

TransactionReceipt.logs

iterator: Iterator<Log>;

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

Iterator<Log>

TransactionReceipt.[iterator]


confirmations(): Promise<number>;

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

Resolves to the number of confirmations this transaction has.

Promise<number>

TransactionReceipt.confirmations


getBlock(): Promise<Block>;

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

Resolves to the block this transaction occurred in.

Promise<Block>

TransactionReceipt.getBlock


getResult(): Promise<string>;

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

Resolves to the return value of the execution of this transaction.

Support for this feature is limited, as it requires an archive node with the debug_ or trace_ API enabled.

Promise<string>

TransactionReceipt.getResult


getTransaction(): Promise<TransactionResponse>;

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

Resolves to the transaction this transaction occurred in.

Promise<TransactionResponse>

TransactionReceipt.getTransaction


removedEvent(): OrphanFilter;

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

@_ignore:

OrphanFilter

TransactionReceipt.removedEvent


reorderedEvent(other?): OrphanFilter;

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

@_ignore:

ParameterType
other?TransactionResponse

OrphanFilter

TransactionReceipt.reorderedEvent


toJSON(): any;

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

Returns a JSON-compatible representation.

any

TransactionReceipt.toJSON