Skip to main content

ChildToParentMessageClassic

Classes

ChildToParentMessageReaderClassic

Provides read-only access for classic Child-to-Parent-messages

Extends

  • ChildToParentMessageClassic

Extended by

Properties

PropertyModifierTypeDefault valueDescriptionInherited from
batchNumberreadonlyBigNumberundefinedThe number of the batch this message is part ofChildToParentMessageClassic.batchNumber
indexInBatchreadonlyBigNumberundefinedThe index of this message in the batchChildToParentMessageClassic.indexInBatch
outboxAddressprotectednull | stringnullContains 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
ParameterTypeDescription
childProviderProvider
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
ParameterTypeDescription
childProviderProvider
batchNumbernumber
Returns

Promise<string>

Source

message/ChildToParentMessageClassic.ts:211

hasExecuted()
hasExecuted(childProvider: Provider): Promise<boolean>

Check if given outbox message has already been executed

Parameters
ParameterType
childProviderProvider
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
ParameterType
childProviderProvider
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
ParameterTypeDescription
childProviderProvider
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
ParameterTypeDefault valueDescription
childProviderProviderundefined-
retryDelaynumber500
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
ParameterTypeDescription
parentSignerOrProviderTSigner or provider to be used for executing or reading the Child-to-Parent message.
batchNumberBigNumberThe number of the batch containing the Child-to-Parent message.
indexInBatchBigNumberThe index of the Child-to-Parent message within the batch.
parentProvider?ProviderOptional. 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
ParameterTypeDescription
parentSignerSignerThe signer to be used for executing the Child-to-Parent message.
batchNumberBigNumberThe number of the batch containing the Child-to-Parent message.
indexInBatchBigNumberThe index of the Child-to-Parent message within the batch.
parentProvider?ProviderOptional. 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

PropertyModifierTypeDefault valueDescriptionInherited from
batchNumberreadonlyBigNumberundefinedThe number of the batch this message is part ofChildToParentMessageReaderClassic.batchNumber
indexInBatchreadonlyBigNumberundefinedThe index of this message in the batchChildToParentMessageReaderClassic.indexInBatch
outboxAddressprotectednull | stringnullContains the classic outbox address, or set to zero address if this network
did not have a classic outbox deployed
ChildToParentMessageReaderClassic.outboxAddress
parentSignerprivateSignerundefinedThe 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
ParameterType
childProviderProvider
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
ParameterTypeDescription
childProviderProvider
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
ParameterTypeDescription
childProviderProvider
batchNumbernumber
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
ParameterType
childProviderProvider
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
ParameterType
childProviderProvider
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
ParameterTypeDescription
childProviderProvider
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
ParameterTypeDefault valueDescription
childProviderProviderundefined-
retryDelaynumber500
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
ParameterTypeDescription
parentSignerOrProviderTSigner or provider to be used for executing or reading the Child-to-Parent message.
batchNumberBigNumberThe number of the batch containing the Child-to-Parent message.
indexInBatchBigNumberThe index of the Child-to-Parent message within the batch.
parentProvider?ProviderOptional. 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

Source

message/ChildToParentMessageClassic.ts:98