Skip to content

Commit

Permalink
fixes styling issues for mock L2EP contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-de-leon-cll committed Jan 4, 2024
1 parent d585d34 commit bea23f6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
pragma solidity >=0.7.6 <0.9.0;

import {iOVM_CrossDomainMessenger} from "../../../../vendor/@eth-optimism/contracts/v0.4.7/contracts/optimistic-ethereum/iOVM/bridge/messaging/iOVM_CrossDomainMessenger.sol";
import "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Address.sol";
import {Address} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Address.sol";

contract MockOVMCrossDomainMessenger is iOVM_CrossDomainMessenger {
address internal mockMessageSender;
address internal s_mockMessageSender;

constructor(address sender) {
mockMessageSender = sender;
s_mockMessageSender = sender;
}

function xDomainMessageSender() external view override returns (address) {
return mockMessageSender;
return s_mockMessageSender;
}

function _setMockMessageSender(address sender) external {
mockMessageSender = sender;
s_mockMessageSender = sender;
}

/********************
Expand All @@ -32,4 +32,6 @@ contract MockOVMCrossDomainMessenger is iOVM_CrossDomainMessenger {
function sendMessage(address _target, bytes calldata _message, uint32) external override {
Address.functionCall(_target, _message, "sendMessage reverted");
}

}

Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "../../../../../v0.8/vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Address.sol";
import {Address} from "../../../../../v0.8/vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Address.sol";
import {IScrollMessenger} from "@scroll-tech/contracts/libraries/IScrollMessenger.sol";

contract MockScrollCrossDomainMessenger is IScrollMessenger {
address internal mockMessageSender;
address internal s_mockMessageSender;

constructor(address sender) {
mockMessageSender = sender;
s_mockMessageSender = sender;
}

function xDomainMessageSender() external view override returns (address) {
return mockMessageSender;
return s_mockMessageSender;
}

function _setMockMessageSender(address sender) external {
mockMessageSender = sender;
s_mockMessageSender = sender;
}

/// *****************************
Expand All @@ -36,4 +36,6 @@ contract MockScrollCrossDomainMessenger is IScrollMessenger {
function sendMessage(address _target, uint256, bytes calldata _message, uint256, address) external payable override {
Address.functionCall(_target, _message, "sendMessage reverted");
}

}

0 comments on commit bea23f6

Please sign in to comment.