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
Parameter | Type | Description |
---|---|---|
l2Provider | JsonRpcProvider |
Returns
Promise
<BigNumber
>
number of confirmations of batch including tx, or 0 if no batch included this tx
Source
getBatchNumber()
getBatchNumber(l2Provider: JsonRpcProvider): 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
getL2ToL1Events()
getL2ToL1Events(): L2ToL1TransactionEvent[]
Get an L2ToL1TxEvent events created by this transaction
Returns
L2ToL1TransactionEvent
[]
Source
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
Parameter | Type |
---|---|
l1SignerOrProvider | T |
Returns
Promise
<L2ToL1MessageReaderOrWriter
<T
>[]>
Source
getRedeemScheduledEvents()
getRedeemScheduledEvents(): object[]
Get event data for any redeems that were scheduled in this transaction
Returns
object
[]
Source
isDataAvailable()
isDataAvailable(l2Provider: JsonRpcProvider, confirmations: number): 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
monkeyPatchWait()
static monkeyPatchWait(contractTransaction: ContractTransaction): L2ContractTransaction
Replaces the wait function with one that returns an L2TransactionReceipt
Parameters
Parameter | Type | Description |
---|---|---|
contractTransaction | ContractTransaction |
Returns
L2ContractTransaction
Source
toRedeemTransaction()
static toRedeemTransaction(redeemTx: L2ContractTransaction, l2Provider: Provider): RedeemTransaction
Adds a waitForRedeem function to a redeem transaction
Parameters
Parameter | Type | Description |
---|---|---|
redeemTx | L2ContractTransaction | |
l2Provider | Provider |
Returns
RedeemTransaction