From 08096d20875fcce887f290ae61d2eed33eb7a9cb Mon Sep 17 00:00:00 2001 From: Simson Date: Fri, 1 Sep 2023 15:33:26 +0530 Subject: [PATCH] Move Uptime feeds contracts to a new folder (#10404) * Move Uptime feeds contract to a new folder * Updated tests path for l2ep contracts * fix right path * moved l2ep folder 1 up * Moved AcController to shared/access * removed duplicate interfaces * moved AC interface to shared --- contracts/src/v0.8/Flags.sol | 4 ++-- contracts/src/v0.8/dev/Flags.sol | 4 ++-- .../dev/CrossDomainDelegateForwarder.sol | 0 .../{ => l2ep}/dev/CrossDomainForwarder.sol | 0 .../{ => l2ep}/dev/CrossDomainOwnable.sol | 2 +- .../ArbitrumCrossDomainForwarder.sol | 8 +++---- .../arbitrum}/ArbitrumCrossDomainGovernor.sol | 6 ++--- .../arbitrum}/ArbitrumSequencerUptimeFeed.sol | 20 ++++++++--------- .../dev/arbitrum}/ArbitrumValidator.sol | 22 +++++++++---------- .../ArbitrumSequencerUptimeFeedInterface.sol | 0 .../CrossDomainOwnableInterface.sol | 0 .../interfaces/DelegateForwarderInterface.sol | 0 .../dev/interfaces/ForwarderInterface.sol | 0 .../dev/interfaces/IArbitrumDelayedInbox.sol | 2 +- .../OptimismSequencerUptimeFeedInterface.sol | 0 .../OptimismCrossDomainForwarder.sol | 8 +++---- .../optimism}/OptimismCrossDomainGovernor.sol | 6 ++--- .../optimism}/OptimismSequencerUptimeFeed.sol | 14 ++++++------ .../dev/optimism}/OptimismValidator.sol | 14 ++++++------ .../src/v0.8/llo-feeds/VerifierProxy.sol | 2 +- .../llo-feeds/interfaces/IVerifierProxy.sol | 2 +- .../llo-feeds/test/gas/Gas_VerifierTest.t.sol | 2 +- .../access}/SimpleReadAccessController.sol | 0 .../access}/SimpleWriteAccessController.sol | 4 ++-- .../interfaces/AccessControllerInterface.sol | 0 contracts/test/v0.8/Flags.test.ts | 2 +- .../v0.8/SimpleReadAccessController.test.ts | 2 +- .../v0.8/SimpleWriteAccessController.test.ts | 2 +- .../dev/ArbitrumCrossDomainForwarder.test.ts | 2 +- .../dev/ArbitrumCrossDomainGovernor.test.ts | 2 +- .../dev/ArbitrumSequencerUptimeFeed.test.ts | 4 ++-- .../test/v0.8/dev/ArbitrumValidator.test.ts | 10 ++++----- .../test/v0.8/dev/CrossDomainOwnable.test.ts | 2 +- .../dev/OptimismCrossDomainForwarder.test.ts | 2 +- .../dev/OptimismCrossDomainGovernor.test.ts | 2 +- .../dev/OptimismSequencerUptimeFeed.test.ts | 2 +- .../test/v0.8/dev/OptimismValidator.test.ts | 6 ++--- 37 files changed, 79 insertions(+), 79 deletions(-) rename contracts/src/v0.8/{ => l2ep}/dev/CrossDomainDelegateForwarder.sol (100%) rename contracts/src/v0.8/{ => l2ep}/dev/CrossDomainForwarder.sol (100%) rename contracts/src/v0.8/{ => l2ep}/dev/CrossDomainOwnable.sol (97%) rename contracts/src/v0.8/{dev => l2ep/dev/arbitrum}/ArbitrumCrossDomainForwarder.sol (89%) rename contracts/src/v0.8/{dev => l2ep/dev/arbitrum}/ArbitrumCrossDomainGovernor.sol (90%) rename contracts/src/v0.8/{dev => l2ep/dev/arbitrum}/ArbitrumSequencerUptimeFeed.sol (91%) rename contracts/src/v0.8/{dev => l2ep/dev/arbitrum}/ArbitrumValidator.sol (95%) rename contracts/src/v0.8/{ => l2ep}/dev/interfaces/ArbitrumSequencerUptimeFeedInterface.sol (100%) rename contracts/src/v0.8/{ => l2ep}/dev/interfaces/CrossDomainOwnableInterface.sol (100%) rename contracts/src/v0.8/{ => l2ep}/dev/interfaces/DelegateForwarderInterface.sol (100%) rename contracts/src/v0.8/{ => l2ep}/dev/interfaces/ForwarderInterface.sol (100%) rename contracts/src/v0.8/{ => l2ep}/dev/interfaces/IArbitrumDelayedInbox.sol (85%) rename contracts/src/v0.8/{ => l2ep}/dev/interfaces/OptimismSequencerUptimeFeedInterface.sol (100%) rename contracts/src/v0.8/{dev => l2ep/dev/optimism}/OptimismCrossDomainForwarder.sol (90%) rename contracts/src/v0.8/{dev => l2ep/dev/optimism}/OptimismCrossDomainGovernor.sol (91%) rename contracts/src/v0.8/{dev => l2ep/dev/optimism}/OptimismSequencerUptimeFeed.sol (93%) rename contracts/src/v0.8/{dev => l2ep/dev/optimism}/OptimismValidator.sol (88%) rename contracts/src/v0.8/{ => shared/access}/SimpleReadAccessController.sol (100%) rename contracts/src/v0.8/{ => shared/access}/SimpleWriteAccessController.sol (95%) rename contracts/src/v0.8/{ => shared}/interfaces/AccessControllerInterface.sol (100%) diff --git a/contracts/src/v0.8/Flags.sol b/contracts/src/v0.8/Flags.sol index 1aa62fc25c1..c4d1d0e61cd 100644 --- a/contracts/src/v0.8/Flags.sol +++ b/contracts/src/v0.8/Flags.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "./SimpleReadAccessController.sol"; -import "./interfaces/AccessControllerInterface.sol"; +import "./shared/access/SimpleReadAccessController.sol"; +import "./shared/interfaces/AccessControllerInterface.sol"; import "./interfaces/FlagsInterface.sol"; /** diff --git a/contracts/src/v0.8/dev/Flags.sol b/contracts/src/v0.8/dev/Flags.sol index 11ffa61213d..a06a67026f3 100644 --- a/contracts/src/v0.8/dev/Flags.sol +++ b/contracts/src/v0.8/dev/Flags.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.6; -import "../SimpleReadAccessController.sol"; -import "../interfaces/AccessControllerInterface.sol"; +import "../shared/access/SimpleReadAccessController.sol"; +import "../shared/interfaces/AccessControllerInterface.sol"; import "../interfaces/TypeAndVersionInterface.sol"; /* dev dependencies - to be re/moved after audit */ diff --git a/contracts/src/v0.8/dev/CrossDomainDelegateForwarder.sol b/contracts/src/v0.8/l2ep/dev/CrossDomainDelegateForwarder.sol similarity index 100% rename from contracts/src/v0.8/dev/CrossDomainDelegateForwarder.sol rename to contracts/src/v0.8/l2ep/dev/CrossDomainDelegateForwarder.sol diff --git a/contracts/src/v0.8/dev/CrossDomainForwarder.sol b/contracts/src/v0.8/l2ep/dev/CrossDomainForwarder.sol similarity index 100% rename from contracts/src/v0.8/dev/CrossDomainForwarder.sol rename to contracts/src/v0.8/l2ep/dev/CrossDomainForwarder.sol diff --git a/contracts/src/v0.8/dev/CrossDomainOwnable.sol b/contracts/src/v0.8/l2ep/dev/CrossDomainOwnable.sol similarity index 97% rename from contracts/src/v0.8/dev/CrossDomainOwnable.sol rename to contracts/src/v0.8/l2ep/dev/CrossDomainOwnable.sol index 7a055ddad9e..966a66372fe 100644 --- a/contracts/src/v0.8/dev/CrossDomainOwnable.sol +++ b/contracts/src/v0.8/l2ep/dev/CrossDomainOwnable.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "../shared/access/ConfirmedOwner.sol"; +import "../../shared/access/ConfirmedOwner.sol"; import "./interfaces/CrossDomainOwnableInterface.sol"; /** diff --git a/contracts/src/v0.8/dev/ArbitrumCrossDomainForwarder.sol b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainForwarder.sol similarity index 89% rename from contracts/src/v0.8/dev/ArbitrumCrossDomainForwarder.sol rename to contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainForwarder.sol index cc04e0e4a00..4f4a197d809 100644 --- a/contracts/src/v0.8/dev/ArbitrumCrossDomainForwarder.sol +++ b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainForwarder.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "../interfaces/TypeAndVersionInterface.sol"; -import "./../vendor/arb-bridge-eth/v0.8.0-custom/contracts/libraries/AddressAliasHelper.sol"; -import "../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; -import "./CrossDomainForwarder.sol"; +import "../../../interfaces/TypeAndVersionInterface.sol"; +import "../../../vendor/arb-bridge-eth/v0.8.0-custom/contracts/libraries/AddressAliasHelper.sol"; +import "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import "../CrossDomainForwarder.sol"; /** * @title ArbitrumCrossDomainForwarder - L1 xDomain account representation diff --git a/contracts/src/v0.8/dev/ArbitrumCrossDomainGovernor.sol b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainGovernor.sol similarity index 90% rename from contracts/src/v0.8/dev/ArbitrumCrossDomainGovernor.sol rename to contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainGovernor.sol index 8e93bd2935d..8035d07ad2f 100644 --- a/contracts/src/v0.8/dev/ArbitrumCrossDomainGovernor.sol +++ b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainGovernor.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "./interfaces/DelegateForwarderInterface.sol"; -import "./../vendor/arb-bridge-eth/v0.8.0-custom/contracts/libraries/AddressAliasHelper.sol"; -import "../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import "../interfaces/DelegateForwarderInterface.sol"; +import "../../../vendor/arb-bridge-eth/v0.8.0-custom/contracts/libraries/AddressAliasHelper.sol"; +import "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; import "./ArbitrumCrossDomainForwarder.sol"; /** diff --git a/contracts/src/v0.8/dev/ArbitrumSequencerUptimeFeed.sol b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumSequencerUptimeFeed.sol similarity index 91% rename from contracts/src/v0.8/dev/ArbitrumSequencerUptimeFeed.sol rename to contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumSequencerUptimeFeed.sol index 0191bbd88a3..3c09fb9acad 100644 --- a/contracts/src/v0.8/dev/ArbitrumSequencerUptimeFeed.sol +++ b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumSequencerUptimeFeed.sol @@ -1,16 +1,16 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; -import {AddressAliasHelper} from "./../vendor/arb-bridge-eth/v0.8.0-custom/contracts/libraries/AddressAliasHelper.sol"; -import {ForwarderInterface} from "./interfaces/ForwarderInterface.sol"; -import {AggregatorInterface} from "../interfaces/AggregatorInterface.sol"; -import {AggregatorV3Interface} from "../interfaces/AggregatorV3Interface.sol"; -import {AggregatorV2V3Interface} from "../interfaces/AggregatorV2V3Interface.sol"; -import {TypeAndVersionInterface} from "../interfaces/TypeAndVersionInterface.sol"; -import {FlagsInterface} from "./interfaces/FlagsInterface.sol"; -import {ArbitrumSequencerUptimeFeedInterface} from "./interfaces/ArbitrumSequencerUptimeFeedInterface.sol"; -import {SimpleReadAccessController} from "../SimpleReadAccessController.sol"; -import {ConfirmedOwner} from "../shared/access/ConfirmedOwner.sol"; +import {AddressAliasHelper} from "../../../vendor/arb-bridge-eth/v0.8.0-custom/contracts/libraries/AddressAliasHelper.sol"; +import {ForwarderInterface} from "./../interfaces/ForwarderInterface.sol"; +import {AggregatorInterface} from "../../../interfaces/AggregatorInterface.sol"; +import {AggregatorV3Interface} from "../../../interfaces/AggregatorV3Interface.sol"; +import {AggregatorV2V3Interface} from "../../../interfaces/AggregatorV2V3Interface.sol"; +import {TypeAndVersionInterface} from "../../../interfaces/TypeAndVersionInterface.sol"; +import {FlagsInterface} from "./../../../dev/interfaces/FlagsInterface.sol"; +import {ArbitrumSequencerUptimeFeedInterface} from "../interfaces/ArbitrumSequencerUptimeFeedInterface.sol"; +import {SimpleReadAccessController} from "../../../shared/access/SimpleReadAccessController.sol"; +import {ConfirmedOwner} from "../../../shared/access/ConfirmedOwner.sol"; /** * @title ArbitrumSequencerUptimeFeed - L2 sequencer uptime status aggregator diff --git a/contracts/src/v0.8/dev/ArbitrumValidator.sol b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumValidator.sol similarity index 95% rename from contracts/src/v0.8/dev/ArbitrumValidator.sol rename to contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumValidator.sol index 4e8d9a8537e..c882a09254a 100644 --- a/contracts/src/v0.8/dev/ArbitrumValidator.sol +++ b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumValidator.sol @@ -1,19 +1,19 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "../interfaces/AggregatorValidatorInterface.sol"; -import "../interfaces/TypeAndVersionInterface.sol"; -import "../interfaces/AccessControllerInterface.sol"; -import "../interfaces/AggregatorV3Interface.sol"; -import "../SimpleWriteAccessController.sol"; +import "../../../interfaces/AggregatorValidatorInterface.sol"; +import "../../../interfaces/TypeAndVersionInterface.sol"; +import "../../../shared/interfaces/AccessControllerInterface.sol"; +import "../../../interfaces/AggregatorV3Interface.sol"; +import "../../../shared/access/SimpleWriteAccessController.sol"; /* ./dev dependencies - to be moved from ./dev after audit */ -import "./interfaces/ArbitrumSequencerUptimeFeedInterface.sol"; -import "./interfaces/FlagsInterface.sol"; -import "./interfaces/IArbitrumDelayedInbox.sol"; -import "./../vendor/arb-bridge-eth/v0.8.0-custom/contracts/libraries/AddressAliasHelper.sol"; -import "../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; -import "../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import "../interfaces/ArbitrumSequencerUptimeFeedInterface.sol"; +import "../../../dev/interfaces/FlagsInterface.sol"; +import "../interfaces/IArbitrumDelayedInbox.sol"; +import "../../../vendor/arb-bridge-eth/v0.8.0-custom/contracts/libraries/AddressAliasHelper.sol"; +import "../../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; +import "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; /** * @title ArbitrumValidator - makes xDomain L2 Flags contract call (using L2 xDomain Forwarder contract) diff --git a/contracts/src/v0.8/dev/interfaces/ArbitrumSequencerUptimeFeedInterface.sol b/contracts/src/v0.8/l2ep/dev/interfaces/ArbitrumSequencerUptimeFeedInterface.sol similarity index 100% rename from contracts/src/v0.8/dev/interfaces/ArbitrumSequencerUptimeFeedInterface.sol rename to contracts/src/v0.8/l2ep/dev/interfaces/ArbitrumSequencerUptimeFeedInterface.sol diff --git a/contracts/src/v0.8/dev/interfaces/CrossDomainOwnableInterface.sol b/contracts/src/v0.8/l2ep/dev/interfaces/CrossDomainOwnableInterface.sol similarity index 100% rename from contracts/src/v0.8/dev/interfaces/CrossDomainOwnableInterface.sol rename to contracts/src/v0.8/l2ep/dev/interfaces/CrossDomainOwnableInterface.sol diff --git a/contracts/src/v0.8/dev/interfaces/DelegateForwarderInterface.sol b/contracts/src/v0.8/l2ep/dev/interfaces/DelegateForwarderInterface.sol similarity index 100% rename from contracts/src/v0.8/dev/interfaces/DelegateForwarderInterface.sol rename to contracts/src/v0.8/l2ep/dev/interfaces/DelegateForwarderInterface.sol diff --git a/contracts/src/v0.8/dev/interfaces/ForwarderInterface.sol b/contracts/src/v0.8/l2ep/dev/interfaces/ForwarderInterface.sol similarity index 100% rename from contracts/src/v0.8/dev/interfaces/ForwarderInterface.sol rename to contracts/src/v0.8/l2ep/dev/interfaces/ForwarderInterface.sol diff --git a/contracts/src/v0.8/dev/interfaces/IArbitrumDelayedInbox.sol b/contracts/src/v0.8/l2ep/dev/interfaces/IArbitrumDelayedInbox.sol similarity index 85% rename from contracts/src/v0.8/dev/interfaces/IArbitrumDelayedInbox.sol rename to contracts/src/v0.8/l2ep/dev/interfaces/IArbitrumDelayedInbox.sol index d209551b0c9..65e437189a7 100644 --- a/contracts/src/v0.8/dev/interfaces/IArbitrumDelayedInbox.sol +++ b/contracts/src/v0.8/l2ep/dev/interfaces/IArbitrumDelayedInbox.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "../../vendor/arb-bridge-eth/v0.8.0-custom/contracts/bridge/interfaces/IInbox.sol"; +import "../../../vendor/arb-bridge-eth/v0.8.0-custom/contracts/bridge/interfaces/IInbox.sol"; /** * @notice This interface extends Arbitrum's IInbox interface to include diff --git a/contracts/src/v0.8/dev/interfaces/OptimismSequencerUptimeFeedInterface.sol b/contracts/src/v0.8/l2ep/dev/interfaces/OptimismSequencerUptimeFeedInterface.sol similarity index 100% rename from contracts/src/v0.8/dev/interfaces/OptimismSequencerUptimeFeedInterface.sol rename to contracts/src/v0.8/l2ep/dev/interfaces/OptimismSequencerUptimeFeedInterface.sol diff --git a/contracts/src/v0.8/dev/OptimismCrossDomainForwarder.sol b/contracts/src/v0.8/l2ep/dev/optimism/OptimismCrossDomainForwarder.sol similarity index 90% rename from contracts/src/v0.8/dev/OptimismCrossDomainForwarder.sol rename to contracts/src/v0.8/l2ep/dev/optimism/OptimismCrossDomainForwarder.sol index 9da3db692b9..0eac2e12afd 100644 --- a/contracts/src/v0.8/dev/OptimismCrossDomainForwarder.sol +++ b/contracts/src/v0.8/l2ep/dev/optimism/OptimismCrossDomainForwarder.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "../interfaces/TypeAndVersionInterface.sol"; +import "../../../interfaces/TypeAndVersionInterface.sol"; /* ./dev dependencies - to be moved from ./dev after audit */ -import "./CrossDomainForwarder.sol"; -import "../vendor/@eth-optimism/contracts/0.4.7/contracts/optimistic-ethereum/iOVM/bridge/messaging/iOVM_CrossDomainMessenger.sol"; -import "../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import "../CrossDomainForwarder.sol"; +import "../../../vendor/@eth-optimism/contracts/0.4.7/contracts/optimistic-ethereum/iOVM/bridge/messaging/iOVM_CrossDomainMessenger.sol"; +import "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; /** * @title OptimismCrossDomainForwarder - L1 xDomain account representation diff --git a/contracts/src/v0.8/dev/OptimismCrossDomainGovernor.sol b/contracts/src/v0.8/l2ep/dev/optimism/OptimismCrossDomainGovernor.sol similarity index 91% rename from contracts/src/v0.8/dev/OptimismCrossDomainGovernor.sol rename to contracts/src/v0.8/l2ep/dev/optimism/OptimismCrossDomainGovernor.sol index 4c878b36068..a7fe176c3f5 100644 --- a/contracts/src/v0.8/dev/OptimismCrossDomainGovernor.sol +++ b/contracts/src/v0.8/l2ep/dev/optimism/OptimismCrossDomainGovernor.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "./interfaces/DelegateForwarderInterface.sol"; -import "../vendor/@eth-optimism/contracts/0.4.7/contracts/optimistic-ethereum/iOVM/bridge/messaging/iOVM_CrossDomainMessenger.sol"; -import "../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import "../interfaces/DelegateForwarderInterface.sol"; +import "../../../vendor/@eth-optimism/contracts/0.4.7/contracts/optimistic-ethereum/iOVM/bridge/messaging/iOVM_CrossDomainMessenger.sol"; +import "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; import "./OptimismCrossDomainForwarder.sol"; /** diff --git a/contracts/src/v0.8/dev/OptimismSequencerUptimeFeed.sol b/contracts/src/v0.8/l2ep/dev/optimism/OptimismSequencerUptimeFeed.sol similarity index 93% rename from contracts/src/v0.8/dev/OptimismSequencerUptimeFeed.sol rename to contracts/src/v0.8/l2ep/dev/optimism/OptimismSequencerUptimeFeed.sol index 86215f87237..a4ef57505b5 100644 --- a/contracts/src/v0.8/dev/OptimismSequencerUptimeFeed.sol +++ b/contracts/src/v0.8/l2ep/dev/optimism/OptimismSequencerUptimeFeed.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; -import {AggregatorInterface} from "../interfaces/AggregatorInterface.sol"; -import {AggregatorV3Interface} from "../interfaces/AggregatorV3Interface.sol"; -import {AggregatorV2V3Interface} from "../interfaces/AggregatorV2V3Interface.sol"; -import {TypeAndVersionInterface} from "../interfaces/TypeAndVersionInterface.sol"; -import {OptimismSequencerUptimeFeedInterface} from "./interfaces/OptimismSequencerUptimeFeedInterface.sol"; -import {SimpleReadAccessController} from "../SimpleReadAccessController.sol"; -import {ConfirmedOwner} from "../shared/access/ConfirmedOwner.sol"; +import {AggregatorInterface} from "../../../interfaces/AggregatorInterface.sol"; +import {AggregatorV3Interface} from "../../../interfaces/AggregatorV3Interface.sol"; +import {AggregatorV2V3Interface} from "../../../interfaces/AggregatorV2V3Interface.sol"; +import {TypeAndVersionInterface} from "../../../interfaces/TypeAndVersionInterface.sol"; +import {OptimismSequencerUptimeFeedInterface} from "./../interfaces/OptimismSequencerUptimeFeedInterface.sol"; +import {SimpleReadAccessController} from "../../../shared/access/SimpleReadAccessController.sol"; +import {ConfirmedOwner} from "../../../shared/access/ConfirmedOwner.sol"; import {IL2CrossDomainMessenger} from "@eth-optimism/contracts/L2/messaging/IL2CrossDomainMessenger.sol"; /** diff --git a/contracts/src/v0.8/dev/OptimismValidator.sol b/contracts/src/v0.8/l2ep/dev/optimism/OptimismValidator.sol similarity index 88% rename from contracts/src/v0.8/dev/OptimismValidator.sol rename to contracts/src/v0.8/l2ep/dev/optimism/OptimismValidator.sol index f08f2e323de..c25b481166f 100644 --- a/contracts/src/v0.8/dev/OptimismValidator.sol +++ b/contracts/src/v0.8/l2ep/dev/optimism/OptimismValidator.sol @@ -1,15 +1,15 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "../interfaces/AggregatorValidatorInterface.sol"; -import "../interfaces/TypeAndVersionInterface.sol"; -import "../interfaces/AccessControllerInterface.sol"; -import "../interfaces/AggregatorV3Interface.sol"; -import "../SimpleWriteAccessController.sol"; +import "../../../interfaces/AggregatorValidatorInterface.sol"; +import "../../../interfaces/TypeAndVersionInterface.sol"; +import "../../../shared/interfaces/AccessControllerInterface.sol"; +import "../../../interfaces/AggregatorV3Interface.sol"; +import "../../../shared/access/SimpleWriteAccessController.sol"; -import "./interfaces/OptimismSequencerUptimeFeedInterface.sol"; +import "./../interfaces/OptimismSequencerUptimeFeedInterface.sol"; import "@eth-optimism/contracts/L1/messaging/IL1CrossDomainMessenger.sol"; -import "../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; +import "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; /** * @title OptimismValidator - makes cross chain call to update the Sequencer Uptime Feed on L2 diff --git a/contracts/src/v0.8/llo-feeds/VerifierProxy.sol b/contracts/src/v0.8/llo-feeds/VerifierProxy.sol index 0dee4ffe70e..be2f411c0e9 100644 --- a/contracts/src/v0.8/llo-feeds/VerifierProxy.sol +++ b/contracts/src/v0.8/llo-feeds/VerifierProxy.sol @@ -5,7 +5,7 @@ import {ConfirmedOwner} from "../shared/access/ConfirmedOwner.sol"; import {IVerifierProxy} from "./interfaces/IVerifierProxy.sol"; import {IVerifier} from "./interfaces/IVerifier.sol"; import {TypeAndVersionInterface} from "../interfaces/TypeAndVersionInterface.sol"; -import {AccessControllerInterface} from "../interfaces/AccessControllerInterface.sol"; +import {AccessControllerInterface} from "../shared/interfaces/AccessControllerInterface.sol"; import {IERC165} from "../vendor/openzeppelin-solidity/v4.8.0/contracts/interfaces/IERC165.sol"; import {IVerifierFeeManager} from "./interfaces/IVerifierFeeManager.sol"; import {Common} from "../libraries/Common.sol"; diff --git a/contracts/src/v0.8/llo-feeds/interfaces/IVerifierProxy.sol b/contracts/src/v0.8/llo-feeds/interfaces/IVerifierProxy.sol index 585c3d82afb..be221263c56 100644 --- a/contracts/src/v0.8/llo-feeds/interfaces/IVerifierProxy.sol +++ b/contracts/src/v0.8/llo-feeds/interfaces/IVerifierProxy.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.16; import {Common} from "../../libraries/Common.sol"; -import {AccessControllerInterface} from "../../interfaces/AccessControllerInterface.sol"; +import {AccessControllerInterface} from "../../shared/interfaces/AccessControllerInterface.sol"; import {IVerifierFeeManager} from "./IVerifierFeeManager.sol"; interface IVerifierProxy { diff --git a/contracts/src/v0.8/llo-feeds/test/gas/Gas_VerifierTest.t.sol b/contracts/src/v0.8/llo-feeds/test/gas/Gas_VerifierTest.t.sol index 97bf9f0351f..d5c26fcd13e 100644 --- a/contracts/src/v0.8/llo-feeds/test/gas/Gas_VerifierTest.t.sol +++ b/contracts/src/v0.8/llo-feeds/test/gas/Gas_VerifierTest.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.16; import {BaseTest, BaseTestWithConfiguredVerifierAndFeeManager} from "../verifier/BaseVerifierTest.t.sol"; import {Verifier} from "../../Verifier.sol"; -import {SimpleWriteAccessController} from "../../../SimpleWriteAccessController.sol"; +import {SimpleWriteAccessController} from "../../../shared/access/SimpleWriteAccessController.sol"; import {Common} from "../../../libraries/Common.sol"; import {IRewardManager} from "../../dev/interfaces/IRewardManager.sol"; diff --git a/contracts/src/v0.8/SimpleReadAccessController.sol b/contracts/src/v0.8/shared/access/SimpleReadAccessController.sol similarity index 100% rename from contracts/src/v0.8/SimpleReadAccessController.sol rename to contracts/src/v0.8/shared/access/SimpleReadAccessController.sol diff --git a/contracts/src/v0.8/SimpleWriteAccessController.sol b/contracts/src/v0.8/shared/access/SimpleWriteAccessController.sol similarity index 95% rename from contracts/src/v0.8/SimpleWriteAccessController.sol rename to contracts/src/v0.8/shared/access/SimpleWriteAccessController.sol index 75459173989..c73dec470b2 100644 --- a/contracts/src/v0.8/SimpleWriteAccessController.sol +++ b/contracts/src/v0.8/shared/access/SimpleWriteAccessController.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "./shared/access/ConfirmedOwner.sol"; -import "./interfaces/AccessControllerInterface.sol"; +import "./ConfirmedOwner.sol"; +import "../interfaces/AccessControllerInterface.sol"; /** * @title SimpleWriteAccessController diff --git a/contracts/src/v0.8/interfaces/AccessControllerInterface.sol b/contracts/src/v0.8/shared/interfaces/AccessControllerInterface.sol similarity index 100% rename from contracts/src/v0.8/interfaces/AccessControllerInterface.sol rename to contracts/src/v0.8/shared/interfaces/AccessControllerInterface.sol diff --git a/contracts/test/v0.8/Flags.test.ts b/contracts/test/v0.8/Flags.test.ts index 9533bf8eb28..eff0912c9e1 100644 --- a/contracts/test/v0.8/Flags.test.ts +++ b/contracts/test/v0.8/Flags.test.ts @@ -17,7 +17,7 @@ let consumer: Contract before(async () => { personas = (await getUsers()).personas controllerFactory = await ethers.getContractFactory( - 'src/v0.8/SimpleWriteAccessController.sol:SimpleWriteAccessController', + 'src/v0.8/shared/access/SimpleWriteAccessController.sol:SimpleWriteAccessController', personas.Nelly, ) consumerFactory = await ethers.getContractFactory( diff --git a/contracts/test/v0.8/SimpleReadAccessController.test.ts b/contracts/test/v0.8/SimpleReadAccessController.test.ts index 03bd944da2e..32e2e743de0 100644 --- a/contracts/test/v0.8/SimpleReadAccessController.test.ts +++ b/contracts/test/v0.8/SimpleReadAccessController.test.ts @@ -12,7 +12,7 @@ let controller: Contract before(async () => { personas = (await getUsers()).personas controllerFactory = await ethers.getContractFactory( - 'src/v0.8/SimpleReadAccessController.sol:SimpleReadAccessController', + 'src/v0.8/shared/access/SimpleReadAccessController.sol:SimpleReadAccessController', personas.Carol, ) }) diff --git a/contracts/test/v0.8/SimpleWriteAccessController.test.ts b/contracts/test/v0.8/SimpleWriteAccessController.test.ts index 29b094ef4b0..f4d7f21966b 100644 --- a/contracts/test/v0.8/SimpleWriteAccessController.test.ts +++ b/contracts/test/v0.8/SimpleWriteAccessController.test.ts @@ -12,7 +12,7 @@ let controller: Contract before(async () => { personas = (await getUsers()).personas controllerFactory = await ethers.getContractFactory( - 'src/v0.8/SimpleWriteAccessController.sol:SimpleWriteAccessController', + 'src/v0.8/shared/access/SimpleWriteAccessController.sol:SimpleWriteAccessController', personas.Carol, ) }) diff --git a/contracts/test/v0.8/dev/ArbitrumCrossDomainForwarder.test.ts b/contracts/test/v0.8/dev/ArbitrumCrossDomainForwarder.test.ts index 63a22c6ba3c..6b6d8abad1b 100644 --- a/contracts/test/v0.8/dev/ArbitrumCrossDomainForwarder.test.ts +++ b/contracts/test/v0.8/dev/ArbitrumCrossDomainForwarder.test.ts @@ -28,7 +28,7 @@ before(async () => { // Contract factories forwarderFactory = await ethers.getContractFactory( - 'src/v0.8/dev/ArbitrumCrossDomainForwarder.sol:ArbitrumCrossDomainForwarder', + 'src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainForwarder.sol:ArbitrumCrossDomainForwarder', owner, ) greeterFactory = await ethers.getContractFactory( diff --git a/contracts/test/v0.8/dev/ArbitrumCrossDomainGovernor.test.ts b/contracts/test/v0.8/dev/ArbitrumCrossDomainGovernor.test.ts index c7a8098800c..1275cc6f3fb 100644 --- a/contracts/test/v0.8/dev/ArbitrumCrossDomainGovernor.test.ts +++ b/contracts/test/v0.8/dev/ArbitrumCrossDomainGovernor.test.ts @@ -31,7 +31,7 @@ before(async () => { // Contract factories governorFactory = await ethers.getContractFactory( - 'src/v0.8/dev/ArbitrumCrossDomainGovernor.sol:ArbitrumCrossDomainGovernor', + 'src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainGovernor.sol:ArbitrumCrossDomainGovernor', owner, ) greeterFactory = await ethers.getContractFactory( diff --git a/contracts/test/v0.8/dev/ArbitrumSequencerUptimeFeed.test.ts b/contracts/test/v0.8/dev/ArbitrumSequencerUptimeFeed.test.ts index c5bf9eacb56..ad1b549acca 100644 --- a/contracts/test/v0.8/dev/ArbitrumSequencerUptimeFeed.test.ts +++ b/contracts/test/v0.8/dev/ArbitrumSequencerUptimeFeed.test.ts @@ -38,7 +38,7 @@ describe('ArbitrumSequencerUptimeFeed', () => { beforeEach(async () => { const accessControllerFactory = await ethers.getContractFactory( - 'src/v0.8/SimpleWriteAccessController.sol:SimpleWriteAccessController', + 'src/v0.8/shared/access/SimpleWriteAccessController.sol:SimpleWriteAccessController', deployer, ) accessController = await accessControllerFactory.deploy() @@ -55,7 +55,7 @@ describe('ArbitrumSequencerUptimeFeed', () => { const arbitrumSequencerStatusRecorderFactory = await ethers.getContractFactory( - 'src/v0.8/dev/ArbitrumSequencerUptimeFeed.sol:ArbitrumSequencerUptimeFeed', + 'src/v0.8/l2ep/dev/arbitrum/ArbitrumSequencerUptimeFeed.sol:ArbitrumSequencerUptimeFeed', deployer, ) arbitrumSequencerUptimeFeed = diff --git a/contracts/test/v0.8/dev/ArbitrumValidator.test.ts b/contracts/test/v0.8/dev/ArbitrumValidator.test.ts index e1d478d33d1..2f95a6f6fb0 100644 --- a/contracts/test/v0.8/dev/ArbitrumValidator.test.ts +++ b/contracts/test/v0.8/dev/ArbitrumValidator.test.ts @@ -8,9 +8,9 @@ import { } from '@ethereum-waffle/mock-contract' /// Pick ABIs from compilation // @ts-ignore -import { abi as arbitrumSequencerStatusRecorderAbi } from '../../../artifacts/src/v0.8/dev/ArbitrumSequencerUptimeFeed.sol/ArbitrumSequencerUptimeFeed.json' +import { abi as arbitrumSequencerStatusRecorderAbi } from '../../../artifacts/src/v0.8/l2ep/dev/arbitrum/ArbitrumSequencerUptimeFeed.sol/ArbitrumSequencerUptimeFeed.json' // @ts-ignore -import { abi as arbitrumInboxAbi } from '../../../artifacts/src/v0.8/dev/vendor/arb-bridge-eth/v0.8.0-custom/contracts/bridge/interfaces/IInbox.sol/IInbox.json' +import { abi as arbitrumInboxAbi } from '../../../artifacts/src/v0.8/vendor/arb-bridge-eth/v0.8.0-custom/contracts/bridge/interfaces/IInbox.sol/IInbox.json' // @ts-ignore import { abi as aggregatorAbi } from '../../../artifacts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.json' @@ -50,14 +50,14 @@ describe('ArbitrumValidator', () => { beforeEach(async () => { const accessControllerFactory = await ethers.getContractFactory( - 'src/v0.8/SimpleWriteAccessController.sol:SimpleWriteAccessController', + 'src/v0.8/shared/access/SimpleWriteAccessController.sol:SimpleWriteAccessController', deployer, ) accessController = await accessControllerFactory.deploy() // Required for building the calldata arbitrumSequencerStatusRecorderFactory = await ethers.getContractFactory( - 'src/v0.8/dev/ArbitrumSequencerUptimeFeed.sol:ArbitrumSequencerUptimeFeed', + 'src/v0.8/l2ep/dev/arbitrum/ArbitrumSequencerUptimeFeed.sol:ArbitrumSequencerUptimeFeed', deployer, ) l1GasFeed = await deployMockContract(deployer as any, aggregatorAbi) @@ -76,7 +76,7 @@ describe('ArbitrumValidator', () => { // Contract under test const arbitrumValidatorFactory = await ethers.getContractFactory( - 'src/v0.8/dev/ArbitrumValidator.sol:ArbitrumValidator', + 'src/v0.8/l2ep/dev/arbitrum/ArbitrumValidator.sol:ArbitrumValidator', deployer, ) arbitrumValidator = await arbitrumValidatorFactory.deploy( diff --git a/contracts/test/v0.8/dev/CrossDomainOwnable.test.ts b/contracts/test/v0.8/dev/CrossDomainOwnable.test.ts index c46845f4f06..7d9d58cfbaa 100644 --- a/contracts/test/v0.8/dev/CrossDomainOwnable.test.ts +++ b/contracts/test/v0.8/dev/CrossDomainOwnable.test.ts @@ -17,7 +17,7 @@ before(async () => { // Contract factories ownableFactory = await ethers.getContractFactory( - 'src/v0.8/dev/CrossDomainOwnable.sol:CrossDomainOwnable', + 'src/v0.8/l2ep/dev/CrossDomainOwnable.sol:CrossDomainOwnable', owner, ) }) diff --git a/contracts/test/v0.8/dev/OptimismCrossDomainForwarder.test.ts b/contracts/test/v0.8/dev/OptimismCrossDomainForwarder.test.ts index 2668f4ea672..76f0e6ddf0a 100644 --- a/contracts/test/v0.8/dev/OptimismCrossDomainForwarder.test.ts +++ b/contracts/test/v0.8/dev/OptimismCrossDomainForwarder.test.ts @@ -26,7 +26,7 @@ before(async () => { // Contract factories forwarderFactory = await ethers.getContractFactory( - 'src/v0.8/dev/OptimismCrossDomainForwarder.sol:OptimismCrossDomainForwarder', + 'src/v0.8/l2ep/dev/optimism/OptimismCrossDomainForwarder.sol:OptimismCrossDomainForwarder', owner, ) greeterFactory = await ethers.getContractFactory( diff --git a/contracts/test/v0.8/dev/OptimismCrossDomainGovernor.test.ts b/contracts/test/v0.8/dev/OptimismCrossDomainGovernor.test.ts index 53c3f4ef254..cedc90ab9a9 100644 --- a/contracts/test/v0.8/dev/OptimismCrossDomainGovernor.test.ts +++ b/contracts/test/v0.8/dev/OptimismCrossDomainGovernor.test.ts @@ -28,7 +28,7 @@ before(async () => { // Contract factories governorFactory = await ethers.getContractFactory( - 'src/v0.8/dev/OptimismCrossDomainGovernor.sol:OptimismCrossDomainGovernor', + 'src/v0.8/l2ep/dev/optimism/OptimismCrossDomainGovernor.sol:OptimismCrossDomainGovernor', owner, ) greeterFactory = await ethers.getContractFactory( diff --git a/contracts/test/v0.8/dev/OptimismSequencerUptimeFeed.test.ts b/contracts/test/v0.8/dev/OptimismSequencerUptimeFeed.test.ts index 3be966d816a..e6b44041a71 100644 --- a/contracts/test/v0.8/dev/OptimismSequencerUptimeFeed.test.ts +++ b/contracts/test/v0.8/dev/OptimismSequencerUptimeFeed.test.ts @@ -43,7 +43,7 @@ describe('OptimismSequencerUptimeFeed', () => { beforeEach(async () => { const optimismSequencerStatusRecorderFactory = await ethers.getContractFactory( - 'src/v0.8/dev/OptimismSequencerUptimeFeed.sol:OptimismSequencerUptimeFeed', + 'src/v0.8/l2ep/dev/optimism/OptimismSequencerUptimeFeed.sol:OptimismSequencerUptimeFeed', deployer, ) optimismUptimeFeed = await optimismSequencerStatusRecorderFactory.deploy( diff --git a/contracts/test/v0.8/dev/OptimismValidator.test.ts b/contracts/test/v0.8/dev/OptimismValidator.test.ts index 4ed901af825..a63780a3f3e 100644 --- a/contracts/test/v0.8/dev/OptimismValidator.test.ts +++ b/contracts/test/v0.8/dev/OptimismValidator.test.ts @@ -4,7 +4,7 @@ import { expect } from 'chai' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' /// Pick ABIs from compilation // @ts-ignore -import { abi as optimismSequencerStatusRecorderAbi } from '../../../artifacts/src/v0.8/dev/OptimismSequencerUptimeFeed.sol/OptimismSequencerUptimeFeed.json' +import { abi as optimismSequencerStatusRecorderAbi } from '../../../artifacts/src/v0.8/l2ep/dev/optimism/OptimismSequencerUptimeFeed.sol/OptimismSequencerUptimeFeed.json' // @ts-ignore import { abi as optimismL1CrossDomainMessengerAbi } from '@eth-optimism/contracts/artifacts/contracts/L1/messaging/L1CrossDomainMessenger.sol' // @ts-ignore @@ -30,7 +30,7 @@ describe('OptimismValidator', () => { beforeEach(async () => { // Required for building the calldata optimismUptimeFeedFactory = await ethers.getContractFactory( - 'src/v0.8/dev/OptimismSequencerUptimeFeed.sol:OptimismSequencerUptimeFeed', + 'src/v0.8/l2ep/dev/optimism/OptimismSequencerUptimeFeed.sol:OptimismSequencerUptimeFeed', deployer, ) @@ -44,7 +44,7 @@ describe('OptimismValidator', () => { // Contract under test const optimismValidatorFactory = await ethers.getContractFactory( - 'src/v0.8/dev/OptimismValidator.sol:OptimismValidator', + 'src/v0.8/l2ep/dev/optimism/OptimismValidator.sol:OptimismValidator', deployer, )