Skip to main content

ChildTransaction

Classes

ChildTransactionReceipt

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

Implements

  • TransactionReceipt

Methods

getBatchConfirmations()
getBatchConfirmations(childProvider: JsonRpcProvider): Promise<BigNumber>

Get number of parent chain confirmations that the batch including this tx has

Parameters
ParameterTypeDescription
childProviderJsonRpcProvider
Returns

Promise<BigNumber>

number of confirmations of batch including tx, or 0 if no batch included this tx

Source

message/ChildTransaction.ts:138

getBatchNumber()
getBatchNumber(childProvider: JsonRpcProvider): Promise<BigNumber>

Get the number of the batch that included this tx (will throw if no such batch exists)

Parameters
ParameterTypeDescription
childProviderJsonRpcProvider
Returns

Promise<BigNumber>

number of batch in which tx was included, or errors if no batch includes the current tx

Source

message/ChildTransaction.ts:151

getChildToParentEvents()
getChildToParentEvents(): ChildToParentTransactionEvent[]

Get ChildToParentTransactionEvent events created by this transaction

Returns

ChildToParentTransactionEvent[]

Source

message/ChildTransaction.ts:97

getChildToParentMessages()
getChildToParentMessages<T>(parentSignerOrProvider: T): Promise<ChildToParentMessageReaderOrWriter<T>[]>

Get any child-to-parent-messages created by this transaction

Type parameters
Type parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
parentSignerOrProviderT
Returns

Promise <ChildToParentMessageReaderOrWriter<T>[]>

Source

message/ChildTransaction.ts:119

getRedeemScheduledEvents()
getRedeemScheduledEvents(): object[]

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

Returns

object[]

Source

message/ChildTransaction.ts:111

isDataAvailable()
isDataAvailable(childProvider: JsonRpcProvider, confirmations: number): Promise<boolean>

Whether the data associated with this transaction has been made available on parent chain

Parameters
ParameterTypeDefault valueDescription
childProviderJsonRpcProviderundefined
confirmationsnumber10The number of confirmations on the batch before data is to be considered available
Returns

Promise<boolean>

Source

message/ChildTransaction.ts:173

monkeyPatchWait()
static monkeyPatchWait(contractTransaction: ContractTransaction): ChildContractTransaction

Replaces the wait function with one that returns an L2TransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

ChildContractTransaction

Source

message/ChildTransaction.ts:187

toRedeemTransaction()
static toRedeemTransaction(redeemTx: ChildContractTransaction, childProvider: Provider): RedeemTransaction

Adds a waitForRedeem function to a redeem transaction

Parameters
ParameterTypeDescription
redeemTxChildContractTransaction
childProviderProvider
Returns

RedeemTransaction

Source

message/ChildTransaction.ts:208