Class: L2ToL1MessageWriterNitro
message/L2ToL1MessageNitro.L2ToL1MessageWriterNitro
Provides read and write access for nitro l2-to-l1-messages
Hierarchy
↳
L2ToL1MessageWriterNitro
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
Name | Type |
---|---|
l2Provider | Provider |
overrides? | Overrides |
Returns
Promise
<ContractTransaction
>
Defined in
src/lib/message/L2ToL1MessageNitro.ts:417
getFirstExecutableBlock
getFirstExecutableBlock(l2Provider
): Promise
<null
| BigNumber
>
Estimates the L1 block number in which this L2 to L1 tx will be available for execution. If the message can or already has been executed, this returns null
Parameters
Name | Type |
---|---|
l2Provider | Provider |
Returns
Promise
<null
| BigNumber
>
expected L1 block number where the L2 to L1 message will be executable. Returns null if the message can be or already has been executed
Inherited from
L2ToL1MessageReaderNitro.getFirstExecutableBlock
Defined in
src/lib/message/L2ToL1MessageNitro.ts:316
hasExecuted
Protected
hasExecuted(l2Provider
): Promise
<boolean
>
Check if this message has already been executed in the Outbox
Parameters
Name | Type |
---|---|
l2Provider | Provider |
Returns
Promise
<boolean
>
Inherited from
L2ToL1MessageReaderNitro.hasExecuted
Defined in
src/lib/message/L2ToL1MessageNitro.ts:139
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
>
Inherited from
L2ToL1MessageReaderNitro.status
Defined in
src/lib/message/L2ToL1MessageNitro.ts:154
waitUntilReadyToExecute
waitUntilReadyToExecute(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
>
Inherited from
L2ToL1MessageReaderNitro.waitUntilReadyToExecute