L1MessageServiceV1
nextMessageNumber
uint256 nextMessageNumber
_messageSender
address _messageSender
DEPRECATED in favor of new transient storage with MESSAGE_SENDER_TRANSIENT_KEY key.
REFUND_OVERHEAD_IN_GAS
uint256 REFUND_OVERHEAD_IN_GAS
adding these should not affect storage as they are constants and are stored in bytecode.
MESSAGE_SENDER_TRANSIENT_KEY
bytes32 MESSAGE_SENDER_TRANSIENT_KEY
The transient storage key to set the message sender against while claiming.
DEFAULT_MESSAGE_SENDER_TRANSIENT_VALUE
address DEFAULT_MESSAGE_SENDER_TRANSIENT_VALUE
The default value for the message sender reset to post claiming using the MESSAGE_SENDER_TRANSIENT_KEY.
distributeFees
modifier distributeFees(uint256 _feeInWei, address _to, bytes _calldata, address _feeRecipient)
The unspent fee is refunded if applicable.
Parameters
| Name | Type | Description |
|---|---|---|
| _feeInWei | uint256 | The fee paid for delivery in Wei. |
| _to | address | The recipient of the message and gas refund. |
| _calldata | bytes | The calldata of the message. |
| _feeRecipient | address |
claimMessage
function claimMessage(address _from, address _to, uint256 _fee, uint256 _value, address payable _feeRecipient, bytes _calldata, uint256 _nonce) external
Claims and delivers a cross-chain message.
_feeRecipient can be set to address(0) to receive as msg.sender. The original message sender address is temporarily set in transient storage, while claiming. This address is used in sender().
Parameters
| Name | Type | Description |
|---|---|---|
| _from | address | The address of the original sender. |
| _to | address | The address the message is intended for. |
| _fee | uint256 | The fee being paid for the message delivery. |
| _value | uint256 | The value to be transferred to the destination address. |
| _feeRecipient | address payable | The recipient for the fee. |
| _calldata | bytes | The calldata to pass to the recipient. |
| _nonce | uint256 | The unique auto generated nonce used when sending the message. |