L1 Sender
L1Sender.sol
is responsible for sending tokens and messages from Ethereum to Arbitrum. It is called by Distribution
to:
Wrap and send the deposit token (stETH) to Arbitrum via the native Arbitrum bridge
Send instructions to mint MOR to Arbitrum via LayerZero
Variables
Name | Type | Description |
---|---|---|
| address | The address of the unwrapped deposit token (stETH). |
| address | The |
|
| Configuration settings for the reward token (MOR). |
|
| Configuration settings for the wrapped deposit token (wstETH). |
Functions
sendDepositToken
Wraps and sends the deposit token (stETH) to Arbitrum via the Gateway Router. This function can only be called by Distribution
.
Parameters
Name | Type | Description |
---|---|---|
| uint256 | The gas limit for the transaction. |
| uint256 | The maximum fee per gas the sender is willing to pay. |
| uint256 | The maximum cost the sender is willing to pay for submission. |
Return Values
Type | Description |
---|---|
bytes | The ABI-encoded Arbitrum inbox sequence number. |
sendMintMessage
Sends a message to mint reward tokens (MOR) on Arbitrum via LayerZero. This function can only be called by Distribution
.
Parameters
Name | Type | Description |
---|---|---|
| address | The user address to receive the minted tokens. |
| uint256 | The amount of tokens to mint. |
| address | The address to refund any excess payment. |
L1Sender__init
Initializes the contract with the Distribution
address, reward token configuration, and deposit token configuration.
Parameters
Name | Type | Description |
---|---|---|
| address | The address responsible for distributing tokens. |
| RewardTokenConfig | Configuration settings for the reward token. |
| DepositTokenConfig | Configuration settings for the deposit token. |
setDistribution
Sets the Distribution
address. This function can only be called by the contract owner.
Parameters
Name | Type | Description |
---|---|---|
| address | The address of |
setRewardTokenConfig
Updates the reward token configuration. This function can only be called by the contract owner.
Parameters
Name | Type | Description |
---|---|---|
|
| The new configuration for the reward token. |
setDepositTokenConfig
Updates the deposit token configuration. This function can only be called by the contract owner.
Parameters
Name | Type | Description |
---|---|---|
|
| The new configuration for the deposit token. |
Structs
DepositTokenConfig
Stores configuration data for the deposit token (stETH) and its bridge.
Fields
Name | Type | Description |
---|---|---|
| address | The address of the wrapped deposit token on Ethereum (wsETH). |
| address | The address of the Arbitrum Gateway Router. |
| address | The address where tokens are received on Arbitrum ( |
RewardTokenConfig
Stores configuration data for the LayerZero messaging bridge.
Name | Type | Description |
---|---|---|
| address | The address of the LayerZero Ethereum endpoint. |
| address | The address where messages are received on Arbitrum ( |
| uint16 | The LayerZero |
| address | The address of the ZRO token holder who would pay for the transaction. |
| bytes | LayerZero Adapter Parameters for custom functionality. |
Last updated
Was this helpful?