mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 04:08:01 -05:00
chore: override internal claim/send message functions to keep the original modifiers
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user