Skip to main content

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
ParameterTypeDescription
l2ProviderProvider
l2ChainIdnumber
messageNumberBigNumber
fromstring-
tostringRecipient address of the ETH on L2
valueBigNumber
Returns

EthDepositMessage

Source

arbitrum-sdk/src/lib/message/L1ToL2Message.ts:809

Properties

PropertyTypeDescription
readonly l2ChainIdnumber
private readonly l2ProviderProvider
readonly messageNumberBigNumber
readonly tostringRecipient address of the ETH on L2
readonly valueBigNumber

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
ParameterTypeDescription
l2ProviderProvider
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

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
ParameterTypeDescription
eventDatastring
Returns

destination and amount

MemberType
tostring
valueBigNumber
Source

arbitrum-sdk/src/lib/message/L1ToL2Message.ts:759


L1ToL2MessageReaderOrWriter

L1ToL2MessageReaderOrWriter: &lt;T&gt; 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

Source

arbitrum-sdk/src/lib/message/L1ToL2Message.ts:229