Skip to main content

L2Transaction

Classes

L2TransactionReceipt

Extension of ethers-js TransactionReceipt, adding Arbitrum-specific functionality

Implements

  • TransactionReceipt

Methods

getBatchConfirmations()
getBatchConfirmations(l2Provider: JsonRpcProvider): 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

message/L2Transaction.ts:138

getBatchNumber()
getBatchNumber(l2Provider: JsonRpcProvider): 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

message/L2Transaction.ts:151

getL2ToL1Events()
getL2ToL1Events(): L2ToL1TransactionEvent[]

Get an L2ToL1TxEvent events created by this transaction

Returns

L2ToL1TransactionEvent[]

Source

message/L2Transaction.ts:97

getL2ToL1Messages()
getL2ToL1Messages<T>(l1SignerOrProvider: T): Promise<L2ToL1MessageReaderOrWriter<T>[]>

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

Type parameters
Type parameter
T extends SignerOrProvider
Parameters
ParameterType
l1SignerOrProviderT
Returns

Promise <L2ToL1MessageReaderOrWriter<T>[]>

Source

message/L2Transaction.ts:119

getRedeemScheduledEvents()
getRedeemScheduledEvents(): object[]

Get event data for any redeems that were scheduled in this transaction

Returns

object[]

Source

message/L2Transaction.ts:111

isDataAvailable()
isDataAvailable(l2Provider: JsonRpcProvider, confirmations: number): 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

message/L2Transaction.ts:173

monkeyPatchWait()
static monkeyPatchWait(contractTransaction: ContractTransaction): L2ContractTransaction

Replaces the wait function with one that returns an L2TransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L2ContractTransaction

Source

message/L2Transaction.ts:187

toRedeemTransaction()
static toRedeemTransaction(redeemTx: L2ContractTransaction, l2Provider: Provider): RedeemTransaction

Adds a waitForRedeem function to a redeem transaction

Parameters
ParameterTypeDescription
redeemTxL2ContractTransaction
l2ProviderProvider
Returns

RedeemTransaction

Source

message/L2Transaction.ts:208