Skip to main content

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

NameTypeDescription
_feeInWeiuint256The fee paid for delivery in Wei.
_toaddressThe recipient of the message and gas refund.
_calldatabytesThe calldata of the message.
_feeRecipientaddress

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

NameTypeDescription
_fromaddressThe address of the original sender.
_toaddressThe address the message is intended for.
_feeuint256The fee being paid for the message delivery.
_valueuint256The value to be transferred to the destination address.
_feeRecipientaddress payableThe recipient for the fee.
_calldatabytesThe calldata to pass to the recipient.
_nonceuint256The unique auto generated nonce used when sending the message.