Class: L2TransactionReceipt
message/L2Transaction.L2TransactionReceipt
Extension of ethers-js TransactionReceipt, adding Arbitrum-specific functionality
Implements
TransactionReceipt
Methods
getBatchConfirmations
getBatchConfirmations(l2Provider
): Promise
<BigNumber
>
Get number of L1 confirmations that the batch including this tx has
Parameters
Name | Type |
---|---|
l2Provider | JsonRpcProvider |
Returns
Promise
<BigNumber
>
number of confirmations of batch including tx, or 0 if no batch included this tx
Defined in
src/lib/message/L2Transaction.ts:138
getBatchNumber
getBatchNumber(l2Provider
): Promise
<BigNumber
>
Get the number of the batch that included this tx (will throw if no such batch exists)
Parameters
Name | Type |
---|---|
l2Provider | JsonRpcProvider |
Returns
Promise
<BigNumber
>
number of batch in which tx was included, or errors if no batch includes the current tx
Defined in
src/lib/message/L2Transaction.ts:151
getL2ToL1Events
getL2ToL1Events(): L2ToL1TransactionEvent
[]
Get an L2ToL1TxEvent events created by this transaction
Returns
L2ToL1TransactionEvent
[]
Defined in
src/lib/message/L2Transaction.ts:97
getL2ToL1Messages
getL2ToL1Messages<T
>(l1SignerOrProvider
): Promise
<L2ToL1MessageReaderOrWriter
<T
>[]>
Get any l2-to-l1-messages created by this transaction
Type parameters
Name | Type |
---|---|
T | extends SignerOrProvider |
Parameters
Name | Type |
---|---|
l1SignerOrProvider | T |
Returns
Promise
<L2ToL1MessageReaderOrWriter
<T
>[]>
Defined in
src/lib/message/L2Transaction.ts:119
getRedeemScheduledEvents
getRedeemScheduledEvents(): { donatedGas
: BigNumber
; gasDonor
: string
; maxRefund
: BigNumber
; retryTxHash
: string
; sequenceNum
: BigNumber
; submissionFeeRefund
: BigNumber
; ticketId
: string
}[]
Get event data for any redeems that were scheduled in this transaction
Returns
{ donatedGas
: BigNumber
; gasDonor
: string
; maxRefund
: BigNumber
; retryTxHash
: string
; sequenceNum
: BigNumber
; submissionFeeRefund
: BigNumber
; ticketId
: string
}[]
Defined in
src/lib/message/L2Transaction.ts:111
isDataAvailable
isDataAvailable(l2Provider
, confirmations?
): Promise
<boolean
>
Whether the data associated with this transaction has been made available on L1
Parameters
Name | Type | Default value | Description |
---|---|---|---|
l2Provider | JsonRpcProvider | undefined | |
confirmations | number | 10 | The number of confirmations on the batch before data is to be considered available |
Returns
Promise
<boolean
>
Defined in
src/lib/message/L2Transaction.ts:173
monkeyPatchWait
Static
monkeyPatchWait(contractTransaction
): L2ContractTransaction
Replaces the wait function with one that returns an L2TransactionReceipt
Parameters
Name | Type |
---|---|
contractTransaction | ContractTransaction |
Returns
L2ContractTransaction
Defined in
src/lib/message/L2Transaction.ts:187
toRedeemTransaction
Static
toRedeemTransaction(redeemTx
, l2Provider
): RedeemTransaction
Adds a waitForRedeem function to a redeem transaction
Parameters
Name | Type |
---|---|
redeemTx | L2ContractTransaction |
l2Provider | Provider |
Returns
RedeemTransaction