receivers.sol 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.4;
  3. import "../../access/Ownable.sol";
  4. import "../../crosschain/amb/CrossChainEnabledAMB.sol";
  5. import "../../crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol";
  6. import "../../crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol";
  7. import "../../crosschain/optimism/CrossChainEnabledOptimism.sol";
  8. import "../../crosschain/polygon/CrossChainEnabledPolygonChild.sol";
  9. abstract contract Receiver is Ownable, CrossChainEnabled {
  10. function crossChainRestricted() external onlyCrossChain {}
  11. function crossChainOwnerRestricted() external onlyCrossChainSender(owner()) {}
  12. }
  13. /**
  14. * AMB
  15. */
  16. contract CrossChainEnabledAMBMock is Receiver, CrossChainEnabledAMB {
  17. /// @custom:oz-upgrades-unsafe-allow constructor
  18. constructor(address bridge) CrossChainEnabledAMB(bridge) {}
  19. }
  20. /**
  21. * Arbitrum
  22. */
  23. contract CrossChainEnabledArbitrumL1Mock is Receiver, CrossChainEnabledArbitrumL1 {
  24. /// @custom:oz-upgrades-unsafe-allow constructor
  25. constructor(address bridge) CrossChainEnabledArbitrumL1(bridge) {}
  26. }
  27. contract CrossChainEnabledArbitrumL2Mock is Receiver, CrossChainEnabledArbitrumL2 {}
  28. /**
  29. * Optimism
  30. */
  31. contract CrossChainEnabledOptimismMock is Receiver, CrossChainEnabledOptimism {
  32. /// @custom:oz-upgrades-unsafe-allow constructor
  33. constructor(address bridge) CrossChainEnabledOptimism(bridge) {}
  34. }
  35. /**
  36. * Polygon
  37. */
  38. contract CrossChainEnabledPolygonChildMock is Receiver, CrossChainEnabledPolygonChild {
  39. /// @custom:oz-upgrades-unsafe-allow constructor
  40. constructor(address bridge) CrossChainEnabledPolygonChild(bridge) {}
  41. }