Skip to main content

Module: message/L2ToL1MessageClassic

L2ToL1MessageReaderClassic

Provides read-only access for classic l2-to-l1-messages

Extends

  • L2ToL1MessageClassic

Properties

PropertyTypeDescription
readonly batchNumberBigNumberThe number of the batch this message is part of
readonly indexInBatchBigNumberThe index of this message in the batch
protected outboxAddressnull | stringContains the classic outbox address, or set to zero address if this network
did not have a classic outbox deployed

Methods

getFirstExecutableBlock()

getFirstExecutableBlock(l2Provider): Promise< null | BigNumber >

Estimates the L1 block number in which this L2 to L1 tx will be available for execution

Parameters
ParameterTypeDescription
l2ProviderProvider
Returns

Promise\< null | BigNumber >

Always returns null for classic l2toL1 messages since they can be executed in any block now.

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:361


getOutboxAddress()

protected getOutboxAddress(l2Provider, batchNumber): Promise< string >

Classic had 2 outboxes, we need to find the correct one for the provided batch number

Parameters
ParameterTypeDescription
l2ProviderProvider
batchNumbernumber
Returns

Promise\< string >

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:195


hasExecuted()

hasExecuted(l2Provider): Promise< boolean >

Check if given outbox message has already been executed

Parameters
ParameterType
l2ProviderProvider
Returns

Promise\< boolean >

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:282


status()

status(l2Provider): Promise< L2ToL1MessageStatus >

Get the status of this message In order to check if the message has been executed proof info must be provided.

Parameters
ParameterType
l2ProviderProvider
Returns

Promise\< L2ToL1MessageStatus >

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:320


tryGetProof()

tryGetProof(l2Provider): Promise< null | MessageBatchProofInfo >

Get the execution proof for this message. Returns null if the batch does not exist yet.

Parameters
ParameterTypeDescription
l2ProviderProvider
Returns

Promise\< null | MessageBatchProofInfo >

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:266


waitUntilOutboxEntryCreated()

waitUntilOutboxEntryCreated(l2Provider, retryDelay = 500): Promise< void >

Waits until the outbox entry has been created, and will not return until it has been. WARNING: Outbox entries are only created when the corresponding node is confirmed. Which can take 1 week+, so waiting here could be a very long operation.

Parameters
ParameterTypeDefault valueDescription
l2ProviderProviderundefined-
retryDelaynumber500
Returns

Promise\< void >

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:343


L2ToL1MessageWriterClassic

Provides read and write access for classic l2-to-l1-messages

Extends

Properties

PropertyTypeDescription
readonly batchNumberBigNumberThe number of the batch this message is part of
readonly indexInBatchBigNumberThe index of this message in the batch
protected outboxAddressnull | stringContains the classic outbox address, or set to zero address if this network
did not have a classic outbox deployed

Methods

execute()

execute(l2Provider, overrides?): Promise< ContractTransaction >

Executes the L2ToL1Message on L1. Will throw an error if the outbox entry has not been created, which happens when the corresponding assertion is confirmed.

Parameters
ParameterType
l2ProviderProvider
overrides?Overrides
Returns

Promise\< ContractTransaction >

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:387


getFirstExecutableBlock()

getFirstExecutableBlock(l2Provider): Promise< null | BigNumber >

Estimates the L1 block number in which this L2 to L1 tx will be available for execution

Parameters
ParameterTypeDescription
l2ProviderProvider
Returns

Promise\< null | BigNumber >

Always returns null for classic l2toL1 messages since they can be executed in any block now.

Inherited from

L2ToL1MessageReaderClassic.getFirstExecutableBlock

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:361


getOutboxAddress()

protected getOutboxAddress(l2Provider, batchNumber): Promise< string >

Classic had 2 outboxes, we need to find the correct one for the provided batch number

Parameters
ParameterTypeDescription
l2ProviderProvider
batchNumbernumber
Returns

Promise\< string >

Inherited from

L2ToL1MessageReaderClassic.getOutboxAddress

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:195


hasExecuted()

hasExecuted(l2Provider): Promise< boolean >

Check if given outbox message has already been executed

Parameters
ParameterType
l2ProviderProvider
Returns

Promise\< boolean >

Inherited from

L2ToL1MessageReaderClassic.hasExecuted

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:282


status()

status(l2Provider): Promise< L2ToL1MessageStatus >

Get the status of this message In order to check if the message has been executed proof info must be provided.

Parameters
ParameterType
l2ProviderProvider
Returns

Promise\< L2ToL1MessageStatus >

Inherited from

L2ToL1MessageReaderClassic.status

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:320


tryGetProof()

tryGetProof(l2Provider): Promise< null | MessageBatchProofInfo >

Get the execution proof for this message. Returns null if the batch does not exist yet.

Parameters
ParameterTypeDescription
l2ProviderProvider
Returns

Promise\< null | MessageBatchProofInfo >

Inherited from

L2ToL1MessageReaderClassic.tryGetProof

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:266


waitUntilOutboxEntryCreated()

waitUntilOutboxEntryCreated(l2Provider, retryDelay = 500): Promise< void >

Waits until the outbox entry has been created, and will not return until it has been. WARNING: Outbox entries are only created when the corresponding node is confirmed. Which can take 1 week+, so waiting here could be a very long operation.

Parameters
ParameterTypeDefault valueDescription
l2ProviderProviderundefined-
retryDelaynumber500
Returns

Promise\< void >

Inherited from

L2ToL1MessageReaderClassic.waitUntilOutboxEntryCreated

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:343


L2ToL1MessageReaderOrWriterClassic

L2ToL1MessageReaderOrWriterClassic: &lt;T&gt; T extends Provider ? L2ToL1MessageReaderClassic : L2ToL1MessageWriterClassic

Conditional type for Signer or Provider. If T is of type Provider then L2ToL1MessageReaderOrWriter\<T> will be of type L2ToL1MessageReader. If T is of type Signer then L2ToL1MessageReaderOrWriter\<T> will be of type L2ToL1MessageWriter.

Type parameters

Parameter
T extends SignerOrProvider

Source

arbitrum-sdk/src/lib/message/L2ToL1MessageClassic.ts:98