Skip to main content

ParentToChildMessage

Classes

EthDepositMessage

A message for Eth deposits from Parent to Child

Constructors

new EthDepositMessage()
new EthDepositMessage(
childProvider: Provider,
childChainId: number,
messageNumber: BigNumber,
from: string,
to: string,
value: BigNumber): EthDepositMessage
Parameters
ParameterTypeDescription
childProviderProvider
childChainIdnumber
messageNumberBigNumber
fromstring-
tostringRecipient address of the ETH on Chain
valueBigNumber
Returns

EthDepositMessage

Source

message/ParentToChildMessage.ts:852

Properties

PropertyModifierTypeDescription
childChainIdreadonlynumber-
childProviderprivateProvider-
messageNumberreadonlyBigNumber-
toreadonlystringRecipient address of the ETH on Chain
valuereadonlyBigNumber-

Methods

fromEventComponents()
static fromEventComponents(
childProvider: Provider,
messageNumber: BigNumber,
senderAddr: string,
inboxMessageEventData: string): Promise<EthDepositMessage>

Create an EthDepositMessage from data emitted in event when calling ethDeposit on Inbox.sol

Parameters
ParameterTypeDescription
childProviderProvider
messageNumberBigNumberThe message number in the Inbox.InboxMessageDelivered event
senderAddrstringThe sender address from Bridge.MessageDelivered event
inboxMessageEventDatastringThe data field from the Inbox.InboxMessageDelivered event
Returns

Promise <EthDepositMessage>

Source

message/ParentToChildMessage.ts:823

parseEthDepositData()
static private parseEthDepositData(eventData: string): object

Parse the data field in event InboxMessageDelivered(uint256 indexed messageNum, bytes data);

Parameters
ParameterTypeDescription
eventDatastring
Returns

object

destination and amount

MemberType
tostring
valueBigNumber
Source

message/ParentToChildMessage.ts:802

Type Aliases

ParentToChildMessageReaderOrWriter<T>

type ParentToChildMessageReaderOrWriter<T>: T extends Provider ? ParentToChildMessageReader : ParentToChildMessageWriter;

Conditional type for Signer or Provider. If T is of type Provider then ParentToChildMessageReaderOrWriter<T> will be of type ParentToChildMessageReader. If T is of type Signer then ParentToChildMessageReaderOrWriter<T> will be of type ParentToChildMessageWriter.

Type parameters

Type parameter
T extends SignerOrProvider

Source

message/ParentToChildMessage.ts:98


ParentToChildMessageWaitForStatusResult

type ParentToChildMessageWaitForStatusResult: object | object;

If the status is redeemed, childTxReceipt is populated. For all other statuses childTxReceipt is not populated

Source

message/ParentToChildMessage.ts:240