Module: message/L1ToL2Message
EthDepositMessage
A message for Eth deposits from L1 to L2
Constructors
constructor()
new EthDepositMessage(
l2Provider,
l2ChainId,
messageNumber,
from,
to,
value): EthDepositMessage
Parameters
Parameter | Type | Description |
---|---|---|
l2Provider | Provider | |
l2ChainId | number | |
messageNumber | BigNumber | |
from | string | - |
to | string | Recipient address of the ETH on L2 |
value | BigNumber |
Returns
Source
arbitrum-sdk/src/lib/message/L1ToL2Message.ts:809
Properties
Property | Type | Description |
---|---|---|
readonly l2ChainId | number | |
private readonly l2Provider | Provider | |
readonly messageNumber | BigNumber | |
readonly to | string | Recipient address of the ETH on L2 |
readonly value | BigNumber |
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
Parameter | 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
>
Source
arbitrum-sdk/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
Parameter | Type | Description |
---|---|---|
eventData | string |
Returns
destination and amount
Member | Type |
---|---|
to | string |
value | BigNumber |
Source
arbitrum-sdk/src/lib/message/L1ToL2Message.ts:759
L1ToL2MessageReaderOrWriter
L1ToL2MessageReaderOrWriter: <T> T extends Provider ? L1ToL2MessageReader : L1ToL2MessageWriter
Conditional type for Signer or Provider. If T is of type Provider then L1ToL2MessageReaderOrWriter\<T> will be of type L1ToL2MessageReader. If T is of type Signer then L1ToL2MessageReaderOrWriter\<T> will be of type L1ToL2MessageWriter.
Type parameters
Parameter |
---|
T extends SignerOrProvider |
Source
arbitrum-sdk/src/lib/message/L1ToL2Message.ts:87
L1ToL2MessageWaitResult
L1ToL2MessageWaitResult: {l2TxReceipt: TransactionReceipt; status: L1ToL2MessageStatus.REDEEMED;} | {status: Exclude< L1ToL2MessageStatus, L1ToL2MessageStatus.REDEEMED >;}
If the status is redeemed an l2TxReceipt is populated. For all other statuses l2TxReceipt is not populated