L2 Message Receiver
L2MessageReceiver.sol
is an implementation of the ILayerZeroReceiver
interface used to receive messages via LayerZero. It receives instructions to mint MOR tokens (e.g. to Capital Providers) from L1Sender
on Ethereum.
Variables
rewardToken
address
The address of the wrapped reward token (wstETH) on Arbitrum.
config
Config
Configuration data for LayerZero messaging.
Functions
lzReceive
Mints MOR tokens according to instructions sent by L1Sender
via LayerZero. This function is blocking.
Parameters:
senderChainId_
uint16
The LayerZero endpointId
of the sender (101/Ethereum)
senderAndReceiverAddresses_
bytes
Concatenated addresses of the sender L1Sender
and receiver L2MessageReceiver
.
nonce_
uint64
Nonce of the message.
payload_
bytes
Minting instructions sent by L1Sender
, consisting of an address to mint MOR tokens to and an amount. ABI encoded as (address, uint256)
.
nonblockingLzReceive
Mints MOR tokens according to instructions sent by L1Sender
via LayerZero. This function is non-blocking.
Parameters:
senderChainId_
uint16
The LayerZero endpointId
of the sender (101/Ethereum)
senderAndReceiverAddresses_
bytes
Concatenated addresses of the sender L1Sender
and receiver L2MessageReceiver
.
payload_
bytes
Minting instructions sent by L1Sender
, consisting of an address to mint MOR tokens to and an amount. ABI encoded as (address, uint256)
.
retryMessage
Retries the processing of a previously failed message.
Parameters
senderChainId_
uint16
The LayerZero endpointId
of the sender (101/Ethereum)
senderAndReceiverAddresses_
bytes
Concatenated addresses of the sender L1Sender
and receiver L2MessageReceiver
.
nonce_
uint64
Nonce of the failed message.
payload_
bytes
Minting instructions sent by L1Sender
, consisting of an address to mint MOR tokens to and an amount. ABI encoded as (address, uint256)
.
L2MessageReceiver__init
Initializes the contract for ownership and upgradeability.
setParams
Sets the parameters of the contract, including the address of the wrapped reward token (wstETH) on Arbitrum and LayerZero configuration settings.
Parameters:
rewardToken_
address
The address of the wrapped reward token on Arbitrum.
config_
Config
Config struct containing various parameters.
Structs
Config
Configuration data for LayerZero messaging.
Fields
gateway
address
The address of the LayerZero gateway on Arbitrum.
sender
address
The address of L1Sender
.
senderChainId
uint16
The LayerZero endpointId
of the sender (101/Ethereum)
Last updated
Was this helpful?