Class: EthDepositMessage
message/L1ToL2Message.EthDepositMessage
A message for Eth deposits from L1 to L2
Constructors
constructor
new EthDepositMessage(l2Provider
, l2ChainId
, messageNumber
, from
, to
, value
)
Parameters
Name | Type | Description |
---|---|---|
l2Provider | Provider | |
l2ChainId | number | |
messageNumber | BigNumber | |
from | string | - |
to | string | Recipient address of the ETH on L2 |
value | BigNumber |
Defined in
src/lib/message/L1ToL2Message.ts:809
Properties
l2ChainId
Readonly
l2ChainId: number
Defined in
src/lib/message/L1ToL2Message.ts:811
l2Provider
Private
Readonly
l2Provider: Provider
Defined in
src/lib/message/L1ToL2Message.ts:810
messageNumber
Readonly
messageNumber: BigNumber
Defined in
src/lib/message/L1ToL2Message.ts:812
to
Readonly
to: string
Recipient address of the ETH on L2
Defined in
src/lib/message/L1ToL2Message.ts:814
value
Readonly
value: BigNumber
Defined in
src/lib/message/L1ToL2Message.ts:815
Methods
fromEventComponents
Static
fromEventComponents(l2Provider
, messageNumber
, senderAddr
, inboxMessageEventData
): Promise
<EthDepositMessage
>
Create an EthDepositMessage from data emitted in event when calling ethDeposit on Inbox.sol
Parameters
Name | Type | Description |
---|---|---|
l2Provider | 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
>
Defined in
src/lib/message/L1ToL2Message.ts:780
parseEthDepositData
Static
Private
parseEthDepositData(eventData
): Object
Parse the data field in event InboxMessageDelivered(uint256 indexed messageNum, bytes data);
Parameters
Name | Type |
---|---|
eventData | string |
Returns
Object
destination and amount
Name | Type |
---|---|
to | string |
value | BigNumber |