Module: message/ChildToParentMessageClassic
ChildToParentMessageReaderClassic
Provides read-only access for classic Child-to-Parent-messages
Extends
ChildToParentMessageClassic
Properties
Property | Type | Description |
---|---|---|
readonly batchNumber | BigNumber | The number of the batch this message is part of |
readonly indexInBatch | BigNumber | The index of this message in the batch |
protected outboxAddress | null | string | Contains the classic outbox address, or set to zero address if this network did not have a classic outbox deployed |
Methods
getFirstExecutableBlock()
getFirstExecutableBlock(childProvider): Promise< null | BigNumber >
Estimates the Parent Chain block number in which this Child-to-Parent tx will be available for execution
Parameters
Parameter | Type | Description |
---|---|---|
childProvider | Provider |
Returns
Promise
< null
| BigNumber
>
Always returns null for classic chainToParentChain messages since they can be executed in any block now.
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:386
getOutboxAddress()
protected getOutboxAddress(childProvider, batchNumber): Promise< string >
Classic had 2 outboxes, we need to find the correct one for the provided batch number
Parameters
Parameter | Type | Description |
---|---|---|
childProvider | Provider | |
batchNumber | number |
Returns
Promise
< string
>
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:211
hasExecuted()
hasExecuted(childProvider): Promise< boolean >
Check if given outbox message has already been executed
Parameters
Parameter | Type |
---|---|
childProvider | Provider |
Returns
Promise
< boolean
>
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:301
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/ChildToParentMessageClassic.ts:339
tryGetProof()
tryGetProof(childProvider): Promise< null | MessageBatchProofInfo >
Get the execution proof for this message. Returns null if the batch does not exist yet.
Parameters
Parameter | Type | Description |
---|---|---|
childProvider | Provider |
Returns
Promise
< null
| MessageBatchProofInfo
>
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:285
waitUntilOutboxEntryCreated()
waitUntilOutboxEntryCreated(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/ChildToParentMessageClassic.ts:364
fromBatchNumber()
static fromBatchNumber<T>(
parentSignerOrProvider,
batchNumber,
indexInBatch,
parentProvider?): ChildToParentMessageReaderOrWriterClassic< T >
Instantiates a new ChildToParentMessageWriterClassic
or ChildToParentMessageReaderClassic
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. |
batchNumber | BigNumber | The number of the batch containing the Child-to-Parent message. |
indexInBatch | BigNumber | The index of the Child-to-Parent message within the batch. |
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
ChildToParentMessageReaderOrWriterClassic
< T
>
Inherited from
ChildToParentMessageClassic.fromBatchNumber
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:128
ChildToParentMessageWriterClassic
Provides read and write access for classic Child-to-Parent-messages
Extends
Constructors
constructor()
new ChildToParentMessageWriterClassic(
parentSigner,
batchNumber,
indexInBatch,
parentProvider?): ChildToParentMessageWriterClassic
Instantiates a new ChildToParentMessageWriterClassic
object.
Parameters
Parameter | Type | Description |
---|---|---|
parentSigner | Signer | The signer to be used for executing the Child-to-Parent message. |
batchNumber | BigNumber | The number of the batch containing the Child-to-Parent message. |
indexInBatch | BigNumber | The index of the Child-to-Parent message within the batch. |
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
ChildToParentMessageWriterClassic
Overrides
ChildToParentMessageReaderClassic.constructor
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:406
Properties
Property | Type | Description |
---|---|---|
readonly batchNumber | BigNumber | The number of the batch this message is part of |
readonly indexInBatch | BigNumber | The index of this message in the batch |
protected outboxAddress | null | string | Contains the classic outbox address, or set to zero address if this network did not have a classic outbox deployed |
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 ChildToParentMessage 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/ChildToParentMessageClassic.ts:421
getFirstExecutableBlock()
getFirstExecutableBlock(childProvider): Promise< null | BigNumber >
Estimates the Parent Chain block number in which this Child-to-Parent tx will be available for execution
Parameters
Parameter | Type | Description |
---|---|---|
childProvider | Provider |
Returns
Promise
< null
| BigNumber
>
Always returns null for classic chainToParentChain messages since they can be executed in any block now.
Inherited from
ChildToParentMessageReaderClassic
.getFirstExecutableBlock
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:386
getOutboxAddress()
protected getOutboxAddress(childProvider, batchNumber): Promise< string >
Classic had 2 outboxes, we need to find the correct one for the provided batch number
Parameters
Parameter | Type | Description |
---|---|---|
childProvider | Provider | |
batchNumber | number |
Returns
Promise
< string
>
Inherited from
ChildToParentMessageReaderClassic
.getOutboxAddress
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:211
hasExecuted()
hasExecuted(childProvider): Promise< boolean >
Check if given outbox message has already been executed
Parameters
Parameter | Type |
---|---|
childProvider | Provider |
Returns
Promise
< boolean
>
Inherited from
ChildToParentMessageReaderClassic
.hasExecuted
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:301
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
ChildToParentMessageReaderClassic
.status
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:339
tryGetProof()
tryGetProof(childProvider): Promise< null | MessageBatchProofInfo >
Get the execution proof for this message. Returns null if the batch does not exist yet.
Parameters
Parameter | Type | Description |
---|---|---|
childProvider | Provider |
Returns
Promise
< null
| MessageBatchProofInfo
>
Inherited from
ChildToParentMessageReaderClassic
.tryGetProof
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:285
waitUntilOutboxEntryCreated()
waitUntilOutboxEntryCreated(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
ChildToParentMessageReaderClassic
.waitUntilOutboxEntryCreated
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:364
fromBatchNumber()
static fromBatchNumber<T>(
parentSignerOrProvider,
batchNumber,
indexInBatch,
parentProvider?): ChildToParentMessageReaderOrWriterClassic< T >
Instantiates a new ChildToParentMessageWriterClassic
or ChildToParentMessageReaderClassic
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. |
batchNumber | BigNumber | The number of the batch containing the Child-to-Parent message. |
indexInBatch | BigNumber | The index of the Child-to-Parent message within the batch. |
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
ChildToParentMessageReaderOrWriterClassic
< T
>
Inherited from
ChildToParentMessageReaderClassic
.fromBatchNumber
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:128
ChildToParentMessageReaderOrWriterClassic
ChildToParentMessageReaderOrWriterClassic: <T> T extends Provider ? ChildToParentMessageReaderClassic : ChildToParentMessageWriterClassic
Conditional type for Signer or Provider. If T is of type Provider then ChildToParentMessageReaderOrWriter<T> will be of type ChildToParentMessageReader. If T is of type Signer then ChildToParentMessageReaderOrWriter<T> will be of type ChildToParentMessageWriter.
Type parameters
Parameter |
---|
T extends SignerOrProvider |
Source
arbitrum-sdk/src/lib/message/ChildToParentMessageClassic.ts:98