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
Parameter | Type |
---|---|
l2Provider | Provider |
Returns
Promise
<EthDepositMessage
[]>
Inherited from
L1TransactionReceipt.getEthDeposits
Defined in
getInboxMessageDeliveredEvents()
getInboxMessageDeliveredEvents(): object[]
Get any InboxMessageDelivered events that were emitted during this transaction
Returns
object
[]
Inherited from
L1TransactionReceipt.getInboxMessageDeliveredEvents
Defined in
getL1ToL2Messages()
getL1ToL2Messages<T>(l2SignerOrProvider: T): Promise<L1ToL2MessageReaderOrWriter<T>[]>
Get any l1tol2 messages created by this transaction
Type Parameters
Type Parameter |
---|
T extends SignerOrProvider |
Parameters
Parameter | Type | Description |
---|---|---|
l2SignerOrProvider | T |
Returns
Promise
<L1ToL2MessageReaderOrWriter
<T
>[]>
Inherited from
L1TransactionReceipt.getL1ToL2Messages
Defined in
getL1ToL2MessagesClassic()
getL1ToL2MessagesClassic(l2Provider: Provider): Promise<L1ToL2MessageReaderClassic[]>
Get classic l1tol2 messages created by this transaction
Parameters
Parameter | Type | Description |
---|---|---|
l2Provider | Provider |
Returns
Promise
<L1ToL2MessageReaderClassic
[]>
Inherited from
L1TransactionReceipt.getL1ToL2MessagesClassic
Defined in
getMessageDeliveredEvents()
getMessageDeliveredEvents(): object[]
Get any MessageDelivered events that were emitted during this transaction
Returns
object
[]
Inherited from
L1TransactionReceipt.getMessageDeliveredEvents
Defined in
getMessageEvents()
getMessageEvents(): object[]
Get combined data for any InboxMessageDelivered and MessageDelivered events emitted during this transaction
Returns
object
[]
Inherited from
L1TransactionReceipt.getMessageEvents
Defined in
getTokenDepositEvents()
getTokenDepositEvents(): object[]
Get any token deposit events created by this transaction
Returns
object
[]
Inherited from
L1TransactionReceipt.getTokenDepositEvents
Defined in
isClassic()
isClassic<T>(l2SignerOrProvider: T): Promise<boolean>
Check if is a classic transaction
Type Parameters
Type Parameter |
---|
T extends SignerOrProvider |
Parameters
Parameter | Type | Description |
---|---|---|
l2SignerOrProvider | T |
Returns
Promise
<boolean
>
Inherited from
L1TransactionReceipt.isClassic
Defined in
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
Parameter | Type | Description |
---|---|---|
l2SignerOrProvider | T | - |
confirmations ? | number | Amount of confirmations the retryable ticket and the auto redeem receipt should have |
timeout ? | number | Amount 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.
Defined in
monkeyPatchContractCallWait()
static monkeyPatchContractCallWait(contractTransaction: ContractTransaction): L1ContractCallTransaction
Replaces the wait function with one that returns an L1ContractCallTransactionReceipt
Parameters
Parameter | Type | Description |
---|---|---|
contractTransaction | ContractTransaction |
Returns
L1ContractCallTransaction
Inherited from
L1TransactionReceipt.monkeyPatchContractCallWait
Defined in
monkeyPatchEthDepositWait()
static monkeyPatchEthDepositWait(contractTransaction: ContractTransaction): L1EthDepositTransaction
Replaces the wait function with one that returns an L1EthDepositTransactionReceipt
Parameters
Parameter | Type | Description |
---|---|---|
contractTransaction | ContractTransaction |
Returns
L1EthDepositTransaction
Inherited from
L1TransactionReceipt.monkeyPatchEthDepositWait
Defined in
monkeyPatchWait()
static monkeyPatchWait(contractTransaction: ContractTransaction): L1ContractTransaction<L1TransactionReceipt>
Replaces the wait function with one that returns an L1TransactionReceipt
Parameters
Parameter | Type | Description |
---|---|---|
contractTransaction | ContractTransaction |
Returns
L1ContractTransaction
<L1TransactionReceipt
>
Inherited from
L1TransactionReceipt.monkeyPatchWait
Defined in
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
Parameter | Type |
---|---|
l2Provider | Provider |
Returns
Promise
<EthDepositMessage
[]>
Inherited from
L1TransactionReceipt.getEthDeposits
Defined in
getInboxMessageDeliveredEvents()
getInboxMessageDeliveredEvents(): object[]
Get any InboxMessageDelivered events that were emitted during this transaction
Returns
object
[]
Inherited from
L1TransactionReceipt.getInboxMessageDeliveredEvents
Defined in
getL1ToL2Messages()
getL1ToL2Messages<T>(l2SignerOrProvider: T): Promise<L1ToL2MessageReaderOrWriter<T>[]>
Get any l1tol2 messages created by this transaction
Type Parameters
Type Parameter |
---|
T extends SignerOrProvider |
Parameters
Parameter | Type | Description |
---|---|---|
l2SignerOrProvider | T |
Returns
Promise
<L1ToL2MessageReaderOrWriter
<T
>[]>
Inherited from
L1TransactionReceipt.getL1ToL2Messages
Defined in
getL1ToL2MessagesClassic()
getL1ToL2MessagesClassic(l2Provider: Provider): Promise<L1ToL2MessageReaderClassic[]>
Get classic l1tol2 messages created by this transaction
Parameters
Parameter | Type | Description |
---|---|---|
l2Provider | Provider |
Returns
Promise
<L1ToL2MessageReaderClassic
[]>
Inherited from
L1TransactionReceipt.getL1ToL2MessagesClassic
Defined in
getMessageDeliveredEvents()
getMessageDeliveredEvents(): object[]
Get any MessageDelivered events that were emitted during this transaction
Returns
object
[]
Inherited from
L1TransactionReceipt.getMessageDeliveredEvents
Defined in
getMessageEvents()
getMessageEvents(): object[]
Get combined data for any InboxMessageDelivered and MessageDelivered events emitted during this transaction
Returns
object
[]
Inherited from
L1TransactionReceipt.getMessageEvents
Defined in
getTokenDepositEvents()
getTokenDepositEvents(): object[]
Get any token deposit events created by this transaction
Returns
object
[]
Inherited from
L1TransactionReceipt.getTokenDepositEvents
Defined in
isClassic()
isClassic<T>(l2SignerOrProvider: T): Promise<boolean>
Check if is a classic transaction
Type Parameters
Type Parameter |
---|
T extends SignerOrProvider |
Parameters
Parameter | Type | Description |
---|---|---|
l2SignerOrProvider | T |
Returns
Promise
<boolean
>
Inherited from
L1TransactionReceipt.isClassic
Defined in
waitForL2()
waitForL2(
l2Provider: Provider,
confirmations?: number,
timeout?: number): Promise<object & EthDepositMessageWaitResult>
Wait for the funds to arrive on L2
Parameters
Parameter | Type | Description |
---|---|---|
l2Provider | Provider | - |
confirmations ? | number | Amount of confirmations the retryable ticket and the auto redeem receipt should have |
timeout ? | number | Amount 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.
Defined in
monkeyPatchContractCallWait()
static monkeyPatchContractCallWait(contractTransaction: ContractTransaction): L1ContractCallTransaction
Replaces the wait function with one that returns an L1ContractCallTransactionReceipt
Parameters
Parameter | Type | Description |
---|---|---|
contractTransaction | ContractTransaction |
Returns
L1ContractCallTransaction
Inherited from
L1TransactionReceipt.monkeyPatchContractCallWait
Defined in
monkeyPatchEthDepositWait()
static monkeyPatchEthDepositWait(contractTransaction: ContractTransaction): L1EthDepositTransaction
Replaces the wait function with one that returns an L1EthDepositTransactionReceipt
Parameters
Parameter | Type | Description |
---|---|---|
contractTransaction | ContractTransaction |
Returns
L1EthDepositTransaction
Inherited from
L1TransactionReceipt.monkeyPatchEthDepositWait
Defined in
monkeyPatchWait()
static monkeyPatchWait(contractTransaction: ContractTransaction): L1ContractTransaction<L1TransactionReceipt>
Replaces the wait function with one that returns an L1TransactionReceipt
Parameters
Parameter | Type | Description |
---|---|---|
contractTransaction | ContractTransaction |
Returns
L1ContractTransaction
<L1TransactionReceipt
>
Inherited from
L1TransactionReceipt.monkeyPatchWait