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
Parameter | Type | Description |
---|---|---|
childProvider | Provider | |
childChainId | number | |
messageNumber | BigNumber | |
from | string | - |
to | string | Recipient address of the ETH on Chain |
value | BigNumber |
Returns
Source
message/ParentToChildMessage.ts:852
Properties
Property | Modifier | Type | Description |
---|---|---|---|
childChainId | readonly | number | - |
childProvider | private | Provider | - |
messageNumber | readonly | BigNumber | - |
to | readonly | string | Recipient address of the ETH on Chain |
value | readonly | BigNumber | - |
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
Parameter | Type | Description |
---|---|---|
childProvider | Provider | |
messageNumber | BigNumber | The message number in the Inbox.InboxMessageDelivered event |
senderAddr | string | The sender address from Bridge.MessageDelivered event |
inboxMessageEventData | string | The 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
Parameter | Type | Description |
---|---|---|
eventData | string |
Returns
object
destination and amount
Member | Type |
---|---|
to | string |
value | BigNumber |
Source
message/ParentToChildMessage.ts:802