TransactionReceipt
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:546
A TransactionReceipt includes additional information about a transaction that is only available after it has been mined.
Extended by
Section titled “Extended by”Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TransactionReceipt(tx, provider): TransactionReceipt;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:645
@_ignore:
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
tx | TransactionReceiptParams |
provider | Provider |
Returns
Section titled “Returns”TransactionReceipt
Properties
Section titled “Properties”blobGasPrice
Section titled “blobGasPrice”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]].
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.blobGasPrice
blobGasUsed
Section titled “blobGasUsed”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]].
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.blobGasUsed
blockHash
Section titled “blockHash”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.
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.blockHash
blockNumber
Section titled “blockNumber”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.
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.blockNumber
contractAddress
Section titled “contractAddress”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.
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.contractAddress
cumulativeGasUsed
Section titled “cumulativeGasUsed”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.
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.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.
Implementation of
Section titled “Implementation of”gasPrice
Section titled “gasPrice”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.
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.gasPrice
gasUsed
Section titled “gasUsed”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.
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.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.
Implementation of
Section titled “Implementation of”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.
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.index
logsBloom
Section titled “logsBloom”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.
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.logsBloom
provider
Section titled “provider”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.
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.
Implementation of
Section titled “Implementation of”status
Section titled “status”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.
Implementation of
Section titled “Implementation of”TransactionReceiptParams
.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.
Implementation of
Section titled “Implementation of”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.
Implementation of
Section titled “Implementation of”Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”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.
Returns
Section titled “Returns”bigint
length
Section titled “length”Get Signature
Section titled “Get Signature”get length(): number;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:657
@_ignore:
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get logs(): readonly Log[];
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:649
The logs for this transaction.
Returns
Section titled “Returns”readonly Log
[]
The logs emitted during the execution of this transaction.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”iterator: Iterator<Log>;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:658
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”confirmations()
Section titled “confirmations()”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.
Returns
Section titled “Returns”Promise
<number
>
getBlock()
Section titled “getBlock()”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.
Returns
Section titled “Returns”getResult()
Section titled “getResult()”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.
Returns
Section titled “Returns”Promise
<string
>
getTransaction()
Section titled “getTransaction()”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.
Returns
Section titled “Returns”removedEvent()
Section titled “removedEvent()”removedEvent(): OrphanFilter;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:685
@_ignore:
Returns
Section titled “Returns”reorderedEvent()
Section titled “reorderedEvent()”reorderedEvent(other?): OrphanFilter;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:689
@_ignore:
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
other? | TransactionResponse |
Returns
Section titled “Returns”toJSON()
Section titled “toJSON()”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.
Returns
Section titled “Returns”any