Skip to main content
Version: 6.11.0

Class: ReceiptTx

Utility that analyses transaction receipt response and provides helpers to process it

Example

const responseTx = new ReceiptTx(receipt);
responseTx.match({
success: (txR: SuccessfulTransactionReceiptResponse) => { },
rejected: (txR: RejectedTransactionReceiptResponse) => { },
reverted: (txR: RevertedTransactionReceiptResponse) => { },
error: (err: Error) => { },
});
responseTx.match({
success: (txR: SuccessfulTransactionReceiptResponse) => { },
_: () => { },
}

Implements​

Constructors​

constructor​

• new ReceiptTx(receipt): ReceiptTx

Parameters​

NameType
receiptGetTxReceiptResponseWithoutHelper

Returns​

ReceiptTx

Defined in​

src/utils/transactionReceipt.ts:39

Properties​

statusReceipt​

• Readonly statusReceipt: keyof TransactionStatusReceiptSets

Implementation of​

TransactionReceiptUtilityInterface.statusReceipt

Defined in​

src/utils/transactionReceipt.ts:35


value​

• Readonly value: TransactionReceiptValue

Implementation of​

TransactionReceiptUtilityInterface.value

Defined in​

src/utils/transactionReceipt.ts:37

Methods​

isSuccess​

â–¸ isSuccess(transactionReceipt): transactionReceipt is SuccessfulTransactionReceiptResponse

Parameters​

NameType
transactionReceiptGetTxReceiptResponseWithoutHelper

Returns​

transactionReceipt is SuccessfulTransactionReceiptResponse

Defined in​

src/utils/transactionReceipt.ts:86


isReverted​

â–¸ isReverted(transactionReceipt): transactionReceipt is RevertedTransactionReceiptResponse

Parameters​

NameType
transactionReceiptGetTxReceiptResponseWithoutHelper

Returns​

transactionReceipt is RevertedTransactionReceiptResponse

Defined in​

src/utils/transactionReceipt.ts:95


isRejected​

â–¸ isRejected(transactionReceipt): transactionReceipt is RejectedTransactionReceiptResponse

Parameters​

NameType
transactionReceiptGetTxReceiptResponseWithoutHelper

Returns​

transactionReceipt is RejectedTransactionReceiptResponse

Defined in​

src/utils/transactionReceipt.ts:104


match​

â–¸ match(callbacks): void

Parameters​

NameType
callbacksTransactionReceiptCallbacks

Returns​

void

Implementation of​

TransactionReceiptUtilityInterface.match

Defined in​

src/utils/transactionReceipt.ts:63


isSuccess​

â–¸ isSuccess(): this is SuccessfulTransactionReceiptResponse

Returns​

this is SuccessfulTransactionReceiptResponse

Implementation of​

TransactionReceiptUtilityInterface.isSuccess

Defined in​

src/utils/transactionReceipt.ts:70


isReverted​

â–¸ isReverted(): this is RevertedTransactionReceiptResponse

Returns​

this is RevertedTransactionReceiptResponse

Implementation of​

TransactionReceiptUtilityInterface.isReverted

Defined in​

src/utils/transactionReceipt.ts:74


isRejected​

â–¸ isRejected(): this is RejectedTransactionReceiptResponse

Returns​

this is RejectedTransactionReceiptResponse

Implementation of​

TransactionReceiptUtilityInterface.isRejected

Defined in​

src/utils/transactionReceipt.ts:78


isError​

â–¸ isError(): boolean

Returns​

boolean

Implementation of​

TransactionReceiptUtilityInterface.isError

Defined in​

src/utils/transactionReceipt.ts:82