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.
feat: add constructor to superchain ERC20 beacon (#34)
- Loading branch information
Showing
7 changed files
with
95 additions
and
55 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
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
16 changes: 9 additions & 7 deletions
16
packages/contracts-bedrock/src/L2/OptimismSuperchainERC20Beacon.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 |
---|---|---|
@@ -1,24 +1,26 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.25; | ||
pragma solidity 0.8.15; | ||
|
||
import { IBeacon } from "@openzeppelin/contracts-v5/proxy/beacon/IBeacon.sol"; | ||
import { IBeacon } from "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; | ||
import { ISemver } from "src/universal/ISemver.sol"; | ||
|
||
/// @custom:proxied | ||
/// @custom:predeployed 0x4200000000000000000000000000000000000027 | ||
/// @title OptimismSuperchainERC20Beacon | ||
/// @notice OptimismSuperchainERC20Beacon is the beacon proxy for the OptimismSuperchainERC20 implementation. | ||
contract OptimismSuperchainERC20Beacon is IBeacon, ISemver { | ||
/// TODO: Replace with real implementation address | ||
/// @notice Address of the OptimismSuperchainERC20 implementation. | ||
address internal constant IMPLEMENTATION_ADDRESS = 0x0000000000000000000000000000000000000000; | ||
address internal immutable IMPLEMENTATION; | ||
|
||
/// @notice Semantic version. | ||
/// @custom:semver 1.0.0-beta.1 | ||
string public constant version = "1.0.0-beta.1"; | ||
|
||
constructor(address _implementation) { | ||
IMPLEMENTATION = _implementation; | ||
} | ||
|
||
/// @inheritdoc IBeacon | ||
function implementation() external pure override returns (address) { | ||
return IMPLEMENTATION_ADDRESS; | ||
function implementation() external view override returns (address) { | ||
return IMPLEMENTATION; | ||
} | ||
} |
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
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