forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maint: add interfaces for legacy contracts (ethereum-optimism#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.
- Loading branch information
1 parent
f8b421b
commit e0f6e1e
Showing
10 changed files
with
95 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
packages/contracts-bedrock/scripts/interfaces/IAddressManager.sol
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
packages/contracts-bedrock/src/legacy/interfaces/IAddressManager.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/contracts-bedrock/src/legacy/interfaces/IDeployerWhitelist.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
function whitelist(address) external view returns (bool); | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/contracts-bedrock/src/legacy/interfaces/IL1BlockNumber.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/contracts-bedrock/src/legacy/interfaces/IL1ChugSplashProxy.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/contracts-bedrock/src/legacy/interfaces/ILegacyMessagePasser.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/contracts-bedrock/src/legacy/interfaces/IResolvedDelegateProxy.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/contracts-bedrock/src/universal/interfaces/IOwnable.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
} |