ChildToParentMessageClassic
Classes
ChildToParentMessageReaderClassic
Provides read-only access for classic Child-to-Parent-messages
Extends
ChildToParentMessageClassic
Extended by
Properties
Property | Modifier | Type | Default value | Description | Inherited from |
---|---|---|---|---|---|
batchNumber | readonly | BigNumber | undefined | The number of the batch this message is part of | ChildToParentMessageClassic.batchNumber |
indexInBatch | readonly | BigNumber | undefined | The index of this message in the batch | ChildToParentMessageClassic.indexInBatch |
outboxAddress | protected | null | string | null | Contains the classic outbox address, or set to zero address if this network did not have a classic outbox deployed | - |
Methods
getFirstExecutableBlock()
getFirstExecutableBlock(childProvider: Provider): 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
message/ChildToParentMessageClassic.ts:386
getOutboxAddress()
protected getOutboxAddress(childProvider: Provider, batchNumber: number): 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
message/ChildToParentMessageClassic.ts:211
hasExecuted()
hasExecuted(childProvider: Provider): Promise<boolean>
Check if given outbox message has already been executed
Parameters
Parameter | Type |
---|---|
childProvider | Provider |
Returns
Promise
<boolean
>
Source
message/ChildToParentMessageClassic.ts:301
status()
status(childProvider: Provider): 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
message/ChildToParentMessageClassic.ts:339
tryGetProof()
tryGetProof(childProvider: Provider): 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
message/ChildToParentMessageClassic.ts:285
waitUntilOutboxEntryCreated()
waitUntilOutboxEntryCreated(childProvider: Provider, retryDelay: number): 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
message/ChildToParentMessageClassic.ts:364
fromBatchNumber()
static fromBatchNumber<T>(
parentSignerOrProvider: T,
batchNumber: BigNumber,
indexInBatch: BigNumber,
parentProvider?: Provider): ChildToParentMessageReaderOrWriterClassic<T>
Instantiates a new ChildToParentMessageWriterClassic
or ChildToParentMessageReaderClassic
object.
Type parameters
Type 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
message/ChildToParentMessageClassic.ts:128
ChildToParentMessageWriterClassic
Provides read and write access for classic Child-to-Parent-messages
Extends
Constructors
new ChildToParentMessageWriterClassic()
new ChildToParentMessageWriterClassic(
parentSigner: Signer,
batchNumber: BigNumber,
indexInBatch: BigNumber,
parentProvider?: Provider): 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
message/ChildToParentMessageClassic.ts:406
Properties
Property | Modifier | Type | Default value | Description | Inherited from |
---|---|---|---|---|---|
batchNumber | readonly | BigNumber | undefined | The number of the batch this message is part of | ChildToParentMessageReaderClassic .batchNumber |
indexInBatch | readonly | BigNumber | undefined | The index of this message in the batch | ChildToParentMessageReaderClassic .indexInBatch |
outboxAddress | protected | null | string | null | Contains the classic outbox address, or set to zero address if this network did not have a classic outbox deployed | ChildToParentMessageReaderClassic .outboxAddress |
parentSigner | private | Signer | undefined | The signer to be used for executing the Child-to-Parent message. | - |
Methods
execute()
execute(childProvider: Provider, overrides?: 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
message/ChildToParentMessageClassic.ts:421
getFirstExecutableBlock()
getFirstExecutableBlock(childProvider: Provider): 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
message/ChildToParentMessageClassic.ts:386
getOutboxAddress()
protected getOutboxAddress(childProvider: Provider, batchNumber: number): 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
message/ChildToParentMessageClassic.ts:211
hasExecuted()
hasExecuted(childProvider: Provider): Promise<boolean>
Check if given outbox message has already been executed
Parameters
Parameter | Type |
---|---|
childProvider | Provider |
Returns
Promise
<boolean
>
Inherited from
ChildToParentMessageReaderClassic
.hasExecuted
Source
message/ChildToParentMessageClassic.ts:301
status()
status(childProvider: Provider): 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
message/ChildToParentMessageClassic.ts:339
tryGetProof()
tryGetProof(childProvider: Provider): 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
message/ChildToParentMessageClassic.ts:285
waitUntilOutboxEntryCreated()
waitUntilOutboxEntryCreated(childProvider: Provider, retryDelay: number): 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
message/ChildToParentMessageClassic.ts:364
fromBatchNumber()
static fromBatchNumber<T>(
parentSignerOrProvider: T,
batchNumber: BigNumber,
indexInBatch: BigNumber,
parentProvider?: Provider): ChildToParentMessageReaderOrWriterClassic<T>
Instantiates a new ChildToParentMessageWriterClassic
or ChildToParentMessageReaderClassic
object.
Type parameters
Type 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
message/ChildToParentMessageClassic.ts:128
Type Aliases
ChildToParentMessageReaderOrWriterClassic<T>
type 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
Type parameter |
---|
T extends SignerOrProvider |