Commit e0f6e1e7 authored by smartcontracts's avatar smartcontracts Committed by GitHub

maint: add interfaces for legacy contracts (#11625)

Adds interfaces for the contracts inside of /legacy. Interface is
not included for the LegacyMintableERC20 contract because that
interface has already been defined elsewhere.
parent f8b421b8
......@@ -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
......
......@@ -68,7 +68,6 @@ EXCLUDE_FILES=(
"ILegacyMintableERC20"
"MintableAndBurnable"
"IDisputeGameFactory"
"IAddressManager"
"IWETH"
"IDelayedWETH"
"IAnchorStateRegistry"
......
// 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);
}
// 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;
}
// 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);
}
// 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);
}
// 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;
}
// 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);
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @title IResolvedDelegateProxy
/// @notice Interface for the ResolvedDelegateProxy contract.
interface IResolvedDelegateProxy {
fallback() external payable;
}
// 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.
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment