chore: override internal claim/send message functions to keep the original modifiers

This commit is contained in:
Andrea Franz
2025-06-27 14:37:36 +02:00
parent 6c6fcceee1
commit 709cf6fa5b
2 changed files with 14 additions and 7 deletions

View File

@@ -38,19 +38,26 @@ contract L2YieldMessageService is L2MessageServiceBase {
);
}
function claimMessage(
function _claimMessage(
address _from,
address _to,
uint256 _fee,
uint256 _value,
address payable, // _feeRecipient
bytes calldata _calldata,
uint256 _nonce
) public override {
) internal override {
if (_value > 0) {
revert L2YieldMessageService__InvalidValue();
}
_claimMessage(_from, _to, _fee, _value, _calldata, _nonce);
super._claimMessage(_from, _to, _fee, _value, _calldata, _nonce);
}
function _sendMessage(address _to, uint256 _fee, bytes calldata _calldata) internal override {
if (msg.value > 0) {
revert L2YieldMessageService__InvalidValue();
}
super._sendMessage(_to, _fee, _calldata);
}
}

View File

@@ -45,11 +45,11 @@ contract YieldRollup is LineaRollupBase {
* @param _fee The fee for the message.
* @param _calldata The calldata for the message.
*/
function sendMessage(
function _sendMessage(
address _to,
uint256 _fee,
bytes calldata _calldata
) public payable override(IMessageService, L1MessageService) {
) internal override {
if (l1ETHBridge == address(0)) {
revert YieldRollup__L1ETHBridgeNotSet();
}
@@ -66,6 +66,6 @@ contract YieldRollup is LineaRollupBase {
revert YieldRollup__InvalidRecipient();
}
_sendMessage(_to, _fee, _calldata);
super._sendMessage(_to, _fee, _calldata);
}
}