Skip to main content

L1Transaction

Classes

L1ContractCallTransactionReceipt

An L1TransactionReceipt with additional functionality that only exists if the transaction created a single call to an L2 contract - this includes token deposits.

Extends

  • L1TransactionReceipt

Methods

getEthDeposits()
getEthDeposits(l2Provider: Provider): Promise<EthDepositMessage[]>

Get any eth deposit messages created by this transaction

Parameters
ParameterType
l2ProviderProvider
Returns

Promise <EthDepositMessage[]>

Inherited from

L1TransactionReceipt.getEthDeposits

Source

message/L1Transaction.ts:182

getInboxMessageDeliveredEvents()
getInboxMessageDeliveredEvents(): object[]

Get any InboxMessageDelivered events that were emitted during this transaction

Returns

object[]

Inherited from

L1TransactionReceipt.getInboxMessageDeliveredEvents

Source

message/L1Transaction.ts:125

getL1ToL2Messages()
getL1ToL2Messages<T>(l2SignerOrProvider: T): Promise<L1ToL2MessageReaderOrWriter<T>[]>

Get any l1tol2 messages created by this transaction

Type parameters
Type parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
l2SignerOrProviderT
Returns

Promise <L1ToL2MessageReaderOrWriter<T>[]>

Inherited from

L1TransactionReceipt.getL1ToL2Messages

Source

message/L1Transaction.ts:239

getL1ToL2MessagesClassic()
getL1ToL2MessagesClassic(l2Provider: Provider): Promise<L1ToL2MessageReaderClassic[]>

Get classic l1tol2 messages created by this transaction

Parameters
ParameterTypeDescription
l2ProviderProvider
Returns

Promise<L1ToL2MessageReaderClassic[]>

Inherited from

L1TransactionReceipt.getL1ToL2MessagesClassic

Source

message/L1Transaction.ts:207

getMessageDeliveredEvents()
getMessageDeliveredEvents(): object[]

Get any MessageDelivered events that were emitted during this transaction

Returns

object[]

Inherited from

L1TransactionReceipt.getMessageDeliveredEvents

Source

message/L1Transaction.ts:117

getMessageEvents()
getMessageEvents(): object[]

Get combined data for any InboxMessageDelivered and MessageDelivered events emitted during this transaction

Returns

object[]

Inherited from

L1TransactionReceipt.getMessageEvents

Source

message/L1Transaction.ts:138

getTokenDepositEvents()
getTokenDepositEvents(): object[]

Get any token deposit events created by this transaction

Returns

object[]

Inherited from

L1TransactionReceipt.getTokenDepositEvents

Source

message/L1Transaction.ts:287

isClassic()
isClassic<T>(l2SignerOrProvider: T): Promise<boolean>

Check if is a classic transaction

Type parameters
Type parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
l2SignerOrProviderT
Returns

Promise<boolean>

Inherited from

L1TransactionReceipt.isClassic

Source

message/L1Transaction.ts:105

waitForL2()
waitForL2<T>(
l2SignerOrProvider: T,
confirmations?: number,
timeout?: number): Promise<object & L1ToL2MessageWaitResult>

Wait for the transaction to arrive and be executed on L2

Type parameters
Type parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
l2SignerOrProviderT-
confirmations?numberAmount of confirmations the retryable ticket and the auto redeem receipt should have
timeout?numberAmount of time to wait for the retryable ticket to be created
Defaults to 15 minutes, as by this time all transactions are expected to be included on L2. Throws on timeout.
Returns

Promise<object & L1ToL2MessageWaitResult>

The wait result contains complete, a status, an L1ToL2Message and optionally the l2TxReceipt. If complete is true then this message is in the terminal state. For contract calls this is true only if the status is REDEEMED.

Source

message/L1Transaction.ts:396

monkeyPatchContractCallWait()
static monkeyPatchContractCallWait(contractTransaction: ContractTransaction): L1ContractCallTransaction

Replaces the wait function with one that returns an L1ContractCallTransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1ContractCallTransaction

Inherited from

L1TransactionReceipt.monkeyPatchContractCallWait

Source

message/L1Transaction.ts:332

monkeyPatchEthDepositWait()
static monkeyPatchEthDepositWait(contractTransaction: ContractTransaction): L1EthDepositTransaction

Replaces the wait function with one that returns an L1EthDepositTransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1EthDepositTransaction

Inherited from

L1TransactionReceipt.monkeyPatchEthDepositWait

Source

message/L1Transaction.ts:316

monkeyPatchWait()
static monkeyPatchWait(contractTransaction: ContractTransaction): L1ContractTransaction<L1TransactionReceipt>

Replaces the wait function with one that returns an L1TransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1ContractTransaction<L1TransactionReceipt>

Inherited from

L1TransactionReceipt.monkeyPatchWait

Source

message/L1Transaction.ts:300


L1EthDepositTransactionReceipt

An L1TransactionReceipt with additional functionality that only exists if the transaction created a single eth deposit.

Extends

  • L1TransactionReceipt

Methods

getEthDeposits()
getEthDeposits(l2Provider: Provider): Promise<EthDepositMessage[]>

Get any eth deposit messages created by this transaction

Parameters
ParameterType
l2ProviderProvider
Returns

Promise <EthDepositMessage[]>

Inherited from

L1TransactionReceipt.getEthDeposits

Source

message/L1Transaction.ts:182

getInboxMessageDeliveredEvents()
getInboxMessageDeliveredEvents(): object[]

Get any InboxMessageDelivered events that were emitted during this transaction

Returns

object[]

Inherited from

L1TransactionReceipt.getInboxMessageDeliveredEvents

Source

message/L1Transaction.ts:125

getL1ToL2Messages()
getL1ToL2Messages<T>(l2SignerOrProvider: T): Promise<L1ToL2MessageReaderOrWriter<T>[]>

Get any l1tol2 messages created by this transaction

Type parameters
Type parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
l2SignerOrProviderT
Returns

Promise <L1ToL2MessageReaderOrWriter<T>[]>

Inherited from

L1TransactionReceipt.getL1ToL2Messages

Source

message/L1Transaction.ts:239

getL1ToL2MessagesClassic()
getL1ToL2MessagesClassic(l2Provider: Provider): Promise<L1ToL2MessageReaderClassic[]>

Get classic l1tol2 messages created by this transaction

Parameters
ParameterTypeDescription
l2ProviderProvider
Returns

Promise<L1ToL2MessageReaderClassic[]>

Inherited from

L1TransactionReceipt.getL1ToL2MessagesClassic

Source

message/L1Transaction.ts:207

getMessageDeliveredEvents()
getMessageDeliveredEvents(): object[]

Get any MessageDelivered events that were emitted during this transaction

Returns

object[]

Inherited from

L1TransactionReceipt.getMessageDeliveredEvents

Source

message/L1Transaction.ts:117

getMessageEvents()
getMessageEvents(): object[]

Get combined data for any InboxMessageDelivered and MessageDelivered events emitted during this transaction

Returns

object[]

Inherited from

L1TransactionReceipt.getMessageEvents

Source

message/L1Transaction.ts:138

getTokenDepositEvents()
getTokenDepositEvents(): object[]

Get any token deposit events created by this transaction

Returns

object[]

Inherited from

L1TransactionReceipt.getTokenDepositEvents

Source

message/L1Transaction.ts:287

isClassic()
isClassic<T>(l2SignerOrProvider: T): Promise<boolean>

Check if is a classic transaction

Type parameters
Type parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
l2SignerOrProviderT
Returns

Promise<boolean>

Inherited from

L1TransactionReceipt.isClassic

Source

message/L1Transaction.ts:105

waitForL2()
waitForL2(
l2Provider: Provider,
confirmations?: number,
timeout?: number): Promise<object & EthDepositMessageWaitResult>

Wait for the funds to arrive on L2

Parameters
ParameterTypeDescription
l2ProviderProvider-
confirmations?numberAmount of confirmations the retryable ticket and the auto redeem receipt should have
timeout?numberAmount of time to wait for the retryable ticket to be created
Defaults to 15 minutes, as by this time all transactions are expected to be included on L2. Throws on timeout.
Returns

Promise<object & EthDepositMessageWaitResult>

The wait result contains complete, a status, the L1ToL2Message and optionally the l2TxReceipt If complete is true then this message is in the terminal state. For eth deposits complete this is when the status is FUNDS_DEPOSITED, EXPIRED or REDEEMED.

Source

message/L1Transaction.ts:358

monkeyPatchContractCallWait()
static monkeyPatchContractCallWait(contractTransaction: ContractTransaction): L1ContractCallTransaction

Replaces the wait function with one that returns an L1ContractCallTransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1ContractCallTransaction

Inherited from

L1TransactionReceipt.monkeyPatchContractCallWait

Source

message/L1Transaction.ts:332

monkeyPatchEthDepositWait()
static monkeyPatchEthDepositWait(contractTransaction: ContractTransaction): L1EthDepositTransaction

Replaces the wait function with one that returns an L1EthDepositTransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1EthDepositTransaction

Inherited from

L1TransactionReceipt.monkeyPatchEthDepositWait

Source

message/L1Transaction.ts:316

monkeyPatchWait()
static monkeyPatchWait(contractTransaction: ContractTransaction): L1ContractTransaction<L1TransactionReceipt>

Replaces the wait function with one that returns an L1TransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1ContractTransaction<L1TransactionReceipt>

Inherited from

L1TransactionReceipt.monkeyPatchWait

Source

message/L1Transaction.ts:300