L1MessageService
systemMigrationBlock
uint256 systemMigrationBlock
This is currently not in use, but is reserved for future upgrades.
__MessageService_init
function __MessageService_init(uint256 _rateLimitPeriod, uint256 _rateLimitAmount) internal
Initialises underlying message service dependencies.
Parameters
Name | Type | Description |
---|---|---|
_rateLimitPeriod | uint256 | The period to rate limit against. |
_rateLimitAmount | uint256 | The limit allowed for withdrawing the period. |
sendMessage
function sendMessage(address _to, uint256 _fee, bytes _calldata) external payable
Adds a message for sending cross-chain and emits MessageSent.
_The message number is preset (nextMessageNumber) and only incremented at the end if successful for the next caller. This function should be called with a msg.value = _value + fee. The fee will be paid on the destination chain.
Parameters
Name | Type | Description |
---|---|---|
_to | address | The address the message is intended for. |
_fee | uint256 | The fee being paid for the message delivery. |
_calldata | bytes | The calldata to pass to the recipient. |
claimMessageWithProof
function claimMessageWithProof(struct IL1MessageService.ClaimMessageWithProofParams _params) external
Claims and delivers a cross-chain message using a Merkle proof.
if tree depth is empty, it will revert with L2MerkleRootDoesNotExist. if tree depth is different than proof size, it will revert with ProofLengthDifferentThanMerkleDepth.
Parameters
Name | Type | Description |
---|---|---|
_params | struct IL1MessageService.ClaimMessageWithProofParams | Collection of claim data with proof and supporting data. |
sender
function sender() external view returns (address originalSender)
Claims and delivers a cross-chain message.
The message sender address is set temporarily in the transient storage when claiming.
Return Values
Name | Type | Description |
---|---|---|
originalSender | address | The message sender address that is stored temporarily in the transient storage when claiming. |