Class: L2ToL1MessageReaderClassic
message/L2ToL1MessageClassic.L2ToL1MessageReaderClassic
Provides read-only access for classic l2-to-l1-messages
Hierarchy
L2ToL1MessageClassic
↳
L2ToL1MessageReaderClassic
Properties
batchNumber
Readonly
batchNumber: BigNumber
The number of the batch this message is part of
Inherited from
L2ToL1MessageClassic.batchNumber
Defined in
src/lib/message/L2ToL1MessageClassic.ts:105
indexInBatch
Readonly
indexInBatch: BigNumber
The index of this message in the batch
Inherited from
L2ToL1MessageClassic.indexInBatch
Defined in
src/lib/message/L2ToL1MessageClassic.ts:110
outboxAddress
Protected
outboxAddress: null
| string
= null
Contains the classic outbox address, or set to zero address if this network did not have a classic outbox deployed
Defined in
src/lib/message/L2ToL1MessageClassic.ts:187
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
Name | Type |
---|---|
l2Provider | Provider |
Returns
Promise
<null
| BigNumber
>
Always returns null for classic l2toL1 messages since they can be executed in any block now.
Defined in
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
Name | Type |
---|---|
l2Provider | Provider |
batchNumber | number |
Returns
Promise
<string
>
Defined in
src/lib/message/L2ToL1MessageClassic.ts:195
hasExecuted
hasExecuted(l2Provider
): Promise
<boolean
>
Check if given outbox message has already been executed
Parameters
Name | Type |
---|---|
l2Provider | Provider |
Returns
Promise
<boolean
>
Defined in
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
Name | Type |
---|---|
l2Provider | Provider |
Returns
Promise
<L2ToL1MessageStatus
>
Defined in
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
Name | Type |
---|---|
l2Provider | Provider |
Returns
Promise
<null
| MessageBatchProofInfo
>
Defined in
src/lib/message/L2ToL1MessageClassic.ts:266
waitUntilOutboxEntryCreated
waitUntilOutboxEntryCreated(l2Provider
, retryDelay?
): 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
Name | Type | Default value |
---|---|---|
l2Provider | Provider | undefined |
retryDelay | number | 500 |
Returns
Promise
<void
>