Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: add interfaces for legacy contracts #11625

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/scripts/Artifacts.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ EXCLUDE_FILES=(
"ILegacyMintableERC20"
"MintableAndBurnable"
"IDisputeGameFactory"
"IAddressManager"
"IWETH"
"IDelayedWETH"
"IAnchorStateRegistry"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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;
}
mds1 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -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);
smartcontracts marked this conversation as resolved.
Show resolved Hide resolved
function whitelist(address) external view returns (bool);
}
Original file line number Diff line number Diff line change
@@ -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);
}
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -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);
}
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -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.
}