Module: 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
Parameter | Type | Description |
---|---|---|
l2Provider | JsonRpcProvider |
Returns
Promise
\< BigNumber
>
number of confirmations of batch including tx, or 0 if no batch included this tx
Source
arbitrum-sdk/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
Parameter | Type | Description |
---|---|---|
l2Provider | JsonRpcProvider |
Returns
Promise
\< BigNumber
>
number of batch in which tx was included, or errors if no batch includes the current tx
Source
arbitrum-sdk/src/lib/message/L2Transaction.ts:151
getL2ToL1Events()
getL2ToL1Events(): L2ToL1TransactionEvent[]
Get an L2ToL1TxEvent events created by this transaction
Returns
L2ToL1TransactionEvent
[]
Source
arbitrum-sdk/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
Parameter |
---|
T extends SignerOrProvider |
Parameters
Parameter | Type |
---|---|
l1SignerOrProvider | T |
Returns
Promise
\< L2ToL1MessageReaderOrWriter
\< T
>[] >
Source
arbitrum-sdk/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
;}[]
Source
arbitrum-sdk/src/lib/message/L2Transaction.ts:111
isDataAvailable()
isDataAvailable(l2Provider, confirmations = 10): Promise< boolean >
Whether the data associated with this transaction has been made available on L1
Parameters
Parameter | 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
>
Source
arbitrum-sdk/src/lib/message/L2Transaction.ts:173
monkeyPatchWait()
static monkeyPatchWait(contractTransaction): L2ContractTransaction
Replaces the wait function with one that returns an L2TransactionReceipt
Parameters
Parameter | Type | Description |
---|---|---|
contractTransaction | ContractTransaction |
Returns
L2ContractTransaction
Source
arbitrum-sdk/src/lib/message/L2Transaction.ts:187
toRedeemTransaction()
static toRedeemTransaction(redeemTx, l2Provider): RedeemTransaction
Adds a waitForRedeem function to a redeem transaction
Parameters
Parameter | Type | Description |
---|---|---|
redeemTx | L2ContractTransaction | |
l2Provider | Provider |
Returns
RedeemTransaction