diff --git a/packages/contracts-bedrock/scripts/Artifacts.s.sol b/packages/contracts-bedrock/scripts/Artifacts.s.sol index b054d2e27254..3325f98d3acc 100644 --- a/packages/contracts-bedrock/scripts/Artifacts.s.sol +++ b/packages/contracts-bedrock/scripts/Artifacts.s.sol @@ -11,7 +11,7 @@ import { StorageSlot } from "scripts/libraries/ForgeArtifacts.sol"; import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol"; import { LibString } from "@solady/utils/LibString.sol"; import { ForgeArtifacts } from "scripts/libraries/ForgeArtifacts.sol"; -import { IAddressManager } from "scripts/interfaces/IAddressManager.sol"; +import { IAddressManager } from "src/legacy/interfaces/IAddressManager.sol"; import { Process } from "scripts/libraries/Process.sol"; /// @notice Represents a deployment. Is serialized to JSON as a key/value diff --git a/packages/contracts-bedrock/scripts/checks/check-interfaces.sh b/packages/contracts-bedrock/scripts/checks/check-interfaces.sh index a3b15768b73c..d57f5c9b665b 100755 --- a/packages/contracts-bedrock/scripts/checks/check-interfaces.sh +++ b/packages/contracts-bedrock/scripts/checks/check-interfaces.sh @@ -68,7 +68,6 @@ EXCLUDE_FILES=( "ILegacyMintableERC20" "MintableAndBurnable" "IDisputeGameFactory" - "IAddressManager" "IWETH" "IDelayedWETH" "IAnchorStateRegistry" diff --git a/packages/contracts-bedrock/scripts/interfaces/IAddressManager.sol b/packages/contracts-bedrock/scripts/interfaces/IAddressManager.sol deleted file mode 100644 index f7e87cdc8702..000000000000 --- a/packages/contracts-bedrock/scripts/interfaces/IAddressManager.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.15; - -/// @title IAddressManager -/// @notice Minimal interface of the Legacy AddressManager. -interface IAddressManager { - /// @notice Emitted when an address is modified in the registry. - /// @param name String name being set in the registry. - /// @param newAddress Address set for the given name. - /// @param oldAddress Address that was previously set for the given name. - event AddressSet(string indexed name, address newAddress, address oldAddress); - - /// @notice Changes the address associated with a particular name. - /// @param _name String name to associate an address with. - /// @param _address Address to associate with the name. - function setAddress(string memory _name, address _address) external; - - /// @notice Retrieves the address associated with a given name. - /// @param _name Name to retrieve an address for. - /// @return Address associated with the given name. - function getAddress(string memory _name) external view returns (address); -} diff --git a/packages/contracts-bedrock/src/legacy/interfaces/IAddressManager.sol b/packages/contracts-bedrock/src/legacy/interfaces/IAddressManager.sol new file mode 100644 index 000000000000..3fae2cbab430 --- /dev/null +++ b/packages/contracts-bedrock/src/legacy/interfaces/IAddressManager.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { IOwnable } from "src/universal/interfaces/IOwnable.sol"; + +/// @title IAddressManager +/// @notice Interface for the AddressManager contract. +interface IAddressManager is IOwnable { + event AddressSet(string indexed name, address newAddress, address oldAddress); + + function getAddress(string memory _name) external view returns (address); + function setAddress(string memory _name, address _address) external; +} diff --git a/packages/contracts-bedrock/src/legacy/interfaces/IDeployerWhitelist.sol b/packages/contracts-bedrock/src/legacy/interfaces/IDeployerWhitelist.sol new file mode 100644 index 000000000000..6914eefabb3d --- /dev/null +++ b/packages/contracts-bedrock/src/legacy/interfaces/IDeployerWhitelist.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ISemver } from "src/universal/ISemver.sol"; + +/// @title IDeployerWhitelist +/// @notice Interface for the DeployerWhitelist contract. +interface IDeployerWhitelist { + event OwnerChanged(address oldOwner, address newOwner); + event WhitelistDisabled(address oldOwner); + event WhitelistStatusChanged(address deployer, bool whitelisted); + + function enableArbitraryContractDeployment() external; + function isDeployerAllowed(address _deployer) external view returns (bool); + function owner() external view returns (address); + function setOwner(address _owner) external; + function setWhitelistedDeployer(address _deployer, bool _isWhitelisted) external; + function version() external view returns (string memory); + function whitelist(address) external view returns (bool); +} diff --git a/packages/contracts-bedrock/src/legacy/interfaces/IL1BlockNumber.sol b/packages/contracts-bedrock/src/legacy/interfaces/IL1BlockNumber.sol new file mode 100644 index 000000000000..1b59b53e396f --- /dev/null +++ b/packages/contracts-bedrock/src/legacy/interfaces/IL1BlockNumber.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ISemver } from "src/universal/ISemver.sol"; + +/// @title IL1BlockNumber +/// @notice Interface for the L1BlockNumber contract. +interface IL1BlockNumber is ISemver { + fallback() external payable; + + receive() external payable; + + function getL1BlockNumber() external view returns (uint256); +} diff --git a/packages/contracts-bedrock/src/legacy/interfaces/IL1ChugSplashProxy.sol b/packages/contracts-bedrock/src/legacy/interfaces/IL1ChugSplashProxy.sol new file mode 100644 index 000000000000..5840dcf056c3 --- /dev/null +++ b/packages/contracts-bedrock/src/legacy/interfaces/IL1ChugSplashProxy.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @title IL1ChugSplashProxy +/// @notice Interface for the L1ChugSplashProxy contract. +interface IL1ChugSplashProxy { + fallback() external payable; + + receive() external payable; + + function getImplementation() external returns (address); + function getOwner() external returns (address); + function setCode(bytes memory _code) external; + function setOwner(address _owner) external; + function setStorage(bytes32 _key, bytes32 _value) external; +} diff --git a/packages/contracts-bedrock/src/legacy/interfaces/ILegacyMessagePasser.sol b/packages/contracts-bedrock/src/legacy/interfaces/ILegacyMessagePasser.sol new file mode 100644 index 000000000000..79e03871f236 --- /dev/null +++ b/packages/contracts-bedrock/src/legacy/interfaces/ILegacyMessagePasser.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ISemver } from "src/universal/ISemver.sol"; + +/// @title ILegacyMessagePasser +/// @notice Interface for the LegacyMessagePasser contract. +interface ILegacyMessagePasser is ISemver { + function passMessageToL1(bytes memory _message) external; + function sentMessages(bytes32) external view returns (bool); +} diff --git a/packages/contracts-bedrock/src/legacy/interfaces/IResolvedDelegateProxy.sol b/packages/contracts-bedrock/src/legacy/interfaces/IResolvedDelegateProxy.sol new file mode 100644 index 000000000000..abeb3817d9be --- /dev/null +++ b/packages/contracts-bedrock/src/legacy/interfaces/IResolvedDelegateProxy.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @title IResolvedDelegateProxy +/// @notice Interface for the ResolvedDelegateProxy contract. +interface IResolvedDelegateProxy { + fallback() external payable; +} diff --git a/packages/contracts-bedrock/src/universal/interfaces/IOwnable.sol b/packages/contracts-bedrock/src/universal/interfaces/IOwnable.sol new file mode 100644 index 000000000000..968ad63a7652 --- /dev/null +++ b/packages/contracts-bedrock/src/universal/interfaces/IOwnable.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @title IOwnable +/// @notice Interface for Ownable. +interface IOwnable { + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + function owner() external view returns (address); + function renounceOwnership() external; + function transferOwnership(address newOwner) external; // nosemgrep: sol-style-input-arg-fmt. +}