Skip to main content

Module: message/L1Transaction

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): Promise< EthDepositMessage[] >

Get any eth deposit messages created by this transaction

Parameters
ParameterType
l2ProviderProvider
Returns

Promise\< EthDepositMessage[] >

Inherited from

L1TransactionReceipt.getEthDeposits

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:182


getInboxMessageDeliveredEvents()

getInboxMessageDeliveredEvents(): {data: string; messageNum: BigNumber;}[]

Get any InboxMessageDelivered events that were emitted during this transaction

Returns

{data: string; messageNum: BigNumber;}[]

Inherited from

L1TransactionReceipt.getInboxMessageDeliveredEvents

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:125


getL1ToL2Messages()

getL1ToL2Messages&lt;T&gt;(l2SignerOrProvider): Promise< L1ToL2MessageReaderOrWriter< T >[] >

Get any l1tol2 messages created by this transaction

Type parameters
Parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
l2SignerOrProviderT
Returns

Promise\< L1ToL2MessageReaderOrWriter\< T >[] >

Inherited from

L1TransactionReceipt.getL1ToL2Messages

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:239


getL1ToL2MessagesClassic()

getL1ToL2MessagesClassic(l2Provider): Promise< L1ToL2MessageReaderClassic[] >

Get classic l1tol2 messages created by this transaction

Parameters
ParameterTypeDescription
l2ProviderProvider
Returns

Promise\< L1ToL2MessageReaderClassic[] >

Inherited from

L1TransactionReceipt.getL1ToL2MessagesClassic

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:207


getMessageDeliveredEvents()

getMessageDeliveredEvents(): {baseFeeL1: BigNumber; beforeInboxAcc: string; inbox: string; kind: number; messageDataHash: string; messageIndex: BigNumber; sender: string; timestamp: BigNumber;}[]

Get any MessageDelivered events that were emitted during this transaction

Returns

{baseFeeL1: BigNumber; beforeInboxAcc: string; inbox: string; kind: number; messageDataHash: string; messageIndex: BigNumber; sender: string; timestamp: BigNumber;}[]

Inherited from

L1TransactionReceipt.getMessageDeliveredEvents

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:117


getMessageEvents()

getMessageEvents(): {bridgeMessageEvent: {baseFeeL1: BigNumber; beforeInboxAcc: string; inbox: string; kind: number; messageDataHash: string; messageIndex: BigNumber; sender: string; timestamp: BigNumber;}; inboxMessageEvent: {data: string; messageNum: BigNumber;};}[]

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

Returns

{bridgeMessageEvent: {baseFeeL1: BigNumber; beforeInboxAcc: string; inbox: string; kind: number; messageDataHash: string; messageIndex: BigNumber; sender: string; timestamp: BigNumber;}; inboxMessageEvent: {data: string; messageNum: BigNumber;};}[]

Inherited from

L1TransactionReceipt.getMessageEvents

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:138


getTokenDepositEvents()

getTokenDepositEvents(): {_amount: BigNumber; _from: string; _sequenceNumber: BigNumber; _to: string; l1Token: string;}[]

Get any token deposit events created by this transaction

Returns

{_amount: BigNumber; _from: string; _sequenceNumber: BigNumber; _to: string; l1Token: string;}[]

Inherited from

L1TransactionReceipt.getTokenDepositEvents

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:287


isClassic()

isClassic&lt;T&gt;(l2SignerOrProvider): Promise< boolean >

Check if is a classic transaction

Type parameters
Parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
l2SignerOrProviderT
Returns

Promise\< boolean >

Inherited from

L1TransactionReceipt.isClassic

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:105


waitForL2()

waitForL2&lt;T&gt;(
l2SignerOrProvider,
confirmations?,
timeout?): Promise< Object >

Wait for the transaction to arrive and be executed on L2

Type parameters
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 >

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

arbitrum-sdk/src/lib/message/L1Transaction.ts:396


monkeyPatchContractCallWait()

static monkeyPatchContractCallWait(contractTransaction): L1ContractCallTransaction

Replaces the wait function with one that returns an L1ContractCallTransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1ContractCallTransaction

Inherited from

L1TransactionReceipt.monkeyPatchContractCallWait

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:332


monkeyPatchEthDepositWait()

static monkeyPatchEthDepositWait(contractTransaction): L1EthDepositTransaction

Replaces the wait function with one that returns an L1EthDepositTransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1EthDepositTransaction

Inherited from

L1TransactionReceipt.monkeyPatchEthDepositWait

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:316


monkeyPatchWait()

static monkeyPatchWait(contractTransaction): L1ContractTransaction< L1TransactionReceipt >

Replaces the wait function with one that returns an L1TransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1ContractTransaction\< L1TransactionReceipt >

Inherited from

L1TransactionReceipt.monkeyPatchWait

Source

arbitrum-sdk/src/lib/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): Promise< EthDepositMessage[] >

Get any eth deposit messages created by this transaction

Parameters
ParameterType
l2ProviderProvider
Returns

Promise\< EthDepositMessage[] >

Inherited from

L1TransactionReceipt.getEthDeposits

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:182


getInboxMessageDeliveredEvents()

getInboxMessageDeliveredEvents(): {data: string; messageNum: BigNumber;}[]

Get any InboxMessageDelivered events that were emitted during this transaction

Returns

{data: string; messageNum: BigNumber;}[]

Inherited from

L1TransactionReceipt.getInboxMessageDeliveredEvents

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:125


getL1ToL2Messages()

getL1ToL2Messages&lt;T&gt;(l2SignerOrProvider): Promise< L1ToL2MessageReaderOrWriter< T >[] >

Get any l1tol2 messages created by this transaction

Type parameters
Parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
l2SignerOrProviderT
Returns

Promise\< L1ToL2MessageReaderOrWriter\< T >[] >

Inherited from

L1TransactionReceipt.getL1ToL2Messages

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:239


getL1ToL2MessagesClassic()

getL1ToL2MessagesClassic(l2Provider): Promise< L1ToL2MessageReaderClassic[] >

Get classic l1tol2 messages created by this transaction

Parameters
ParameterTypeDescription
l2ProviderProvider
Returns

Promise\< L1ToL2MessageReaderClassic[] >

Inherited from

L1TransactionReceipt.getL1ToL2MessagesClassic

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:207


getMessageDeliveredEvents()

getMessageDeliveredEvents(): {baseFeeL1: BigNumber; beforeInboxAcc: string; inbox: string; kind: number; messageDataHash: string; messageIndex: BigNumber; sender: string; timestamp: BigNumber;}[]

Get any MessageDelivered events that were emitted during this transaction

Returns

{baseFeeL1: BigNumber; beforeInboxAcc: string; inbox: string; kind: number; messageDataHash: string; messageIndex: BigNumber; sender: string; timestamp: BigNumber;}[]

Inherited from

L1TransactionReceipt.getMessageDeliveredEvents

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:117


getMessageEvents()

getMessageEvents(): {bridgeMessageEvent: {baseFeeL1: BigNumber; beforeInboxAcc: string; inbox: string; kind: number; messageDataHash: string; messageIndex: BigNumber; sender: string; timestamp: BigNumber;}; inboxMessageEvent: {data: string; messageNum: BigNumber;};}[]

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

Returns

{bridgeMessageEvent: {baseFeeL1: BigNumber; beforeInboxAcc: string; inbox: string; kind: number; messageDataHash: string; messageIndex: BigNumber; sender: string; timestamp: BigNumber;}; inboxMessageEvent: {data: string; messageNum: BigNumber;};}[]

Inherited from

L1TransactionReceipt.getMessageEvents

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:138


getTokenDepositEvents()

getTokenDepositEvents(): {_amount: BigNumber; _from: string; _sequenceNumber: BigNumber; _to: string; l1Token: string;}[]

Get any token deposit events created by this transaction

Returns

{_amount: BigNumber; _from: string; _sequenceNumber: BigNumber; _to: string; l1Token: string;}[]

Inherited from

L1TransactionReceipt.getTokenDepositEvents

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:287


isClassic()

isClassic&lt;T&gt;(l2SignerOrProvider): Promise< boolean >

Check if is a classic transaction

Type parameters
Parameter
T extends SignerOrProvider
Parameters
ParameterTypeDescription
l2SignerOrProviderT
Returns

Promise\< boolean >

Inherited from

L1TransactionReceipt.isClassic

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:105


waitForL2()

waitForL2(
l2Provider,
confirmations?,
timeout?): Promise< {complete: boolean; message: EthDepositMessage;} & 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\< {complete: boolean; message: EthDepositMessage;} & 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

arbitrum-sdk/src/lib/message/L1Transaction.ts:358


monkeyPatchContractCallWait()

static monkeyPatchContractCallWait(contractTransaction): L1ContractCallTransaction

Replaces the wait function with one that returns an L1ContractCallTransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1ContractCallTransaction

Inherited from

L1TransactionReceipt.monkeyPatchContractCallWait

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:332


monkeyPatchEthDepositWait()

static monkeyPatchEthDepositWait(contractTransaction): L1EthDepositTransaction

Replaces the wait function with one that returns an L1EthDepositTransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1EthDepositTransaction

Inherited from

L1TransactionReceipt.monkeyPatchEthDepositWait

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:316


monkeyPatchWait()

static monkeyPatchWait(contractTransaction): L1ContractTransaction< L1TransactionReceipt >

Replaces the wait function with one that returns an L1TransactionReceipt

Parameters
ParameterTypeDescription
contractTransactionContractTransaction
Returns

L1ContractTransaction\< L1TransactionReceipt >

Inherited from

L1TransactionReceipt.monkeyPatchWait

Source

arbitrum-sdk/src/lib/message/L1Transaction.ts:300