Module: message/ChildToParentMessageNitro
ChildToParentChainMessageNitro
Base functionality for nitro Child->Parent messages
Extended By
Methods
fromEvent()
static fromEvent<T>(
parentSignerOrProvider,
event,
parentProvider?): ChildToParentChainMessageReaderOrWriterNitro< T >
Instantiates a new ChildToParentChainMessageWriterNitro
or ChildToParentChainMessageReaderNitro
object.
Type parameters
Parameter |
---|
T extends SignerOrProvider |
Parameters
Parameter | Type | Description |
---|---|---|
parentSignerOrProvider | T | Signer or provider to be used for executing or reading the Child-to-Parent message. |
event | object | The event containing the data of the Child-to-Parent message. |
event.arbBlockNum | BigNumber | - |
event.caller ? | string | - |
event.callvalue ? | BigNumber | - |
event.data ? | string | - |
event.destination ? | string | - |
event.ethBlockNum ? | BigNumber | - |
event.hash ? | BigNumber | - |
event.position ? | BigNumber | - |
event.timestamp ? | BigNumber | - |
parentProvider ? | Provider | Optional. Used to override the Provider which is attached to parentSignerOrProvider in case you need more control. This will be a required parameter in a future major version update. |
Returns
ChildToParentChainMessageReaderOrWriterNitro
< T
>
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:145
ChildToParentChainMessageReaderNitro
Provides read-only access nitro for child-to-parent-messages
Extends
Methods
getFirstExecutableBlock()
getFirstExecutableBlock(childProvider): Promise< null | BigNumber >
Estimates the parent chain block number in which this child chain to parent chain tx will be available for execution. If the message can or already has been executed, this returns null
Parameters
Parameter | Type | Description |
---|---|---|
childProvider | Provider |
Returns
Promise
< null
| BigNumber
>
expected parent chain block number where the child chain to parent chain message will be executable. Returns null if the message can be or already has been executed
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:457
hasExecuted()
protected hasExecuted(childProvider): Promise< boolean >
Check if this message has already been executed in the Outbox
Parameters
Parameter | Type |
---|---|
childProvider | Provider |
Returns
Promise
< boolean
>
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:224
status()
status(childProvider): Promise< ChildToParentMessageStatus >
Get the status of this message In order to check if the message has been executed proof info must be provided.
Parameters
Parameter | Type |
---|---|
childProvider | Provider |
Returns
Promise
< ChildToParentMessageStatus
>
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:239
waitUntilReadyToExecute()
waitUntilReadyToExecute(childProvider, retryDelay = 500): Promise< CONFIRMED | EXECUTED >
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
Parameter | Type | Default value | Description |
---|---|---|---|
childProvider | Provider | undefined | - |
retryDelay | number | 500 |
Returns
Promise
< CONFIRMED
| EXECUTED
>
outbox entry status (either executed or confirmed but not pending)
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:433
fromEvent()
static fromEvent<T>(
parentSignerOrProvider,
event,
parentProvider?): ChildToParentChainMessageReaderOrWriterNitro< T >
Instantiates a new ChildToParentChainMessageWriterNitro
or ChildToParentChainMessageReaderNitro
object.
Type parameters
Parameter |
---|
T extends SignerOrProvider |
Parameters
Parameter | Type | Description |
---|---|---|
parentSignerOrProvider | T | Signer or provider to be used for executing or reading the Child-to-Parent message. |
event | object | The event containing the data of the Child-to-Parent message. |
event.arbBlockNum | BigNumber | - |
event.caller ? | string | - |
event.callvalue ? | BigNumber | - |
event.data ? | string | - |
event.destination ? | string | - |
event.ethBlockNum ? | BigNumber | - |
event.hash ? | BigNumber | - |
event.position ? | BigNumber | - |
event.timestamp ? | BigNumber | - |
parentProvider ? | Provider | Optional. Used to override the Provider which is attached to parentSignerOrProvider in case you need more control. This will be a required parameter in a future major version update. |
Returns
ChildToParentChainMessageReaderOrWriterNitro
< T
>
Inherited from
ChildToParentChainMessageNitro
.fromEvent
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:145
ChildToParentChainMessageWriterNitro
Provides read and write access for nitro child-to-Parent-messages
Extends
Constructors
constructor()
new ChildToParentChainMessageWriterNitro(
parentSigner,
event,
parentProvider?): ChildToParentChainMessageWriterNitro
Instantiates a new ChildToParentChainMessageWriterNitro
object.
Parameters
Parameter | Type | Description |
---|---|---|
parentSigner | Signer | The signer to be used for executing the Child-to-Parent message. |
event | object | The event containing the data of the Child-to-Parent message. |
event.arbBlockNum | BigNumber | - |
event.caller ? | string | - |
event.callvalue ? | BigNumber | - |
event.data ? | string | - |
event.destination ? | string | - |
event.ethBlockNum ? | BigNumber | - |
event.hash ? | BigNumber | - |
event.position ? | BigNumber | - |
event.timestamp ? | BigNumber | - |
parentProvider ? | Provider | Optional. Used to override the Provider which is attached to parentSigner in case you need more control. This will be a required parameter in a future major version update. |
Returns
ChildToParentChainMessageWriterNitro
Overrides
ChildToParentChainMessageReaderNitro.constructor
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:552
Properties
Property | Type | Description |
---|---|---|
private readonly parentSigner | Signer | The signer to be used for executing the Child-to-Parent message. |
Methods
execute()
execute(childProvider, overrides?): Promise< ContractTransaction >
Executes the ChildToParentChainMessage on Parent Chain. Will throw an error if the outbox entry has not been created, which happens when the corresponding assertion is confirmed.
Parameters
Parameter | Type |
---|---|
childProvider | Provider |
overrides ? | Overrides |
Returns
Promise
< ContractTransaction
>
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:566
getFirstExecutableBlock()
getFirstExecutableBlock(childProvider): Promise< null | BigNumber >
Estimates the parent chain block number in which this child chain to parent chain tx will be available for execution. If the message can or already has been executed, this returns null
Parameters
Parameter | Type | Description |
---|---|---|
childProvider | Provider |
Returns
Promise
< null
| BigNumber
>
expected parent chain block number where the child chain to parent chain message will be executable. Returns null if the message can be or already has been executed
Inherited from
ChildToParentChainMessageReaderNitro
.getFirstExecutableBlock
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:457
hasExecuted()
protected hasExecuted(childProvider): Promise< boolean >
Check if this message has already been executed in the Outbox
Parameters
Parameter | Type |
---|---|
childProvider | Provider |
Returns
Promise
< boolean
>
Inherited from
ChildToParentChainMessageReaderNitro
.hasExecuted
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:224
status()
status(childProvider): Promise< ChildToParentMessageStatus >
Get the status of this message In order to check if the message has been executed proof info must be provided.
Parameters
Parameter | Type |
---|---|
childProvider | Provider |
Returns
Promise
< ChildToParentMessageStatus
>
Inherited from
ChildToParentChainMessageReaderNitro
.status
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:239
waitUntilReadyToExecute()
waitUntilReadyToExecute(childProvider, retryDelay = 500): Promise< CONFIRMED | EXECUTED >
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
Parameter | Type | Default value | Description |
---|---|---|---|
childProvider | Provider | undefined | - |
retryDelay | number | 500 |
Returns
Promise
< CONFIRMED
| EXECUTED
>
outbox entry status (either executed or confirmed but not pending)
Inherited from
ChildToParentChainMessageReaderNitro
.waitUntilReadyToExecute
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:433
fromEvent()
static fromEvent<T>(
parentSignerOrProvider,
event,
parentProvider?): ChildToParentChainMessageReaderOrWriterNitro< T >
Instantiates a new ChildToParentChainMessageWriterNitro
or ChildToParentChainMessageReaderNitro
object.
Type parameters
Parameter |
---|
T extends SignerOrProvider |
Parameters
Parameter | Type | Description |
---|---|---|
parentSignerOrProvider | T | Signer or provider to be used for executing or reading the Child-to-Parent message. |
event | object | The event containing the data of the Child-to-Parent message. |
event.arbBlockNum | BigNumber | - |
event.caller ? | string | - |
event.callvalue ? | BigNumber | - |
event.data ? | string | - |
event.destination ? | string | - |
event.ethBlockNum ? | BigNumber | - |
event.hash ? | BigNumber | - |
event.position ? | BigNumber | - |
event.timestamp ? | BigNumber | - |
parentProvider ? | Provider | Optional. Used to override the Provider which is attached to parentSignerOrProvider in case you need more control. This will be a required parameter in a future major version update. |
Returns
ChildToParentChainMessageReaderOrWriterNitro
< T
>
Inherited from
ChildToParentChainMessageReaderNitro
.fromEvent
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:145
ChildToParentChainMessageReaderOrWriterNitro
ChildToParentChainMessageReaderOrWriterNitro: <T> T extends Provider ? ChildToParentChainMessageReaderNitro : ChildToParentChainMessageWriterNitro
Conditional type for Signer or Provider. If T is of type Provider then ChildToParentChainMessageReaderOrWriter<T> will be of type ChildToParentChainMessageReader. If T is of type Signer then ChildToParentChainMessageReaderOrWriter<T> will be of type ChildToParentChainMessageWriter.
Type parameters
Parameter |
---|
T extends SignerOrProvider |
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageNitro.ts:57