Skip to main content

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
ParameterTypeDescription
l2ProviderJsonRpcProvider
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
ParameterTypeDescription
l2ProviderJsonRpcProvider
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&lt;T&gt;(l1SignerOrProvider): Promise< L2ToL1MessageReaderOrWriter< T >[] >

Get any l2-to-l1-messages created by this transaction

Type parameters
Parameter
T extends SignerOrProvider
Parameters
ParameterType
l1SignerOrProviderT
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
ParameterTypeDefault valueDescription
l2ProviderJsonRpcProviderundefined
confirmationsnumber10The 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
ParameterTypeDescription
contractTransactionContractTransaction
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
ParameterTypeDescription
redeemTxL2ContractTransaction
l2ProviderProvider
Returns

RedeemTransaction

Source

arbitrum-sdk/src/lib/message/L2Transaction.ts:208