Skip to content

Commit 5a7192d

Browse files
committed
move initialize2() into primary initializer
1 parent 66269c8 commit 5a7192d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

contracts/contracts/token/WOETH.sol

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,16 @@ contract WOETH is ERC4626, Governable, Initializable {
4141
*/
4242
function initialize() external onlyGovernor initializer {
4343
OETH(address(asset())).rebaseOptIn();
44+
45+
initialize2();
4446
}
4547

46-
function initialize2() external onlyGovernor {
48+
/**
49+
* @notice secondary initializer that newly deployed contracts will execute as part
50+
* of primary initialize function and the existing contracts will have it called
51+
* as a governance operation.
52+
*/
53+
function initialize2() public onlyGovernor {
4754
require(!_oethCreditsInitialized, "Initialize2 already called");
4855

4956
_oethCreditsInitialized = true;

contracts/deploy/deployActions.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,6 @@ const deployWOusd = async () => {
15111511
const deployWOeth = async () => {
15121512
const { deployerAddr, governorAddr } = await getNamedAccounts();
15131513
const sDeployer = await ethers.provider.getSigner(deployerAddr);
1514-
const sGovernor = await ethers.provider.getSigner(governorAddr);
15151514

15161515
const oeth = await ethers.getContract("OETHProxy");
15171516
const dWrappedOethImpl = await deployWithConfirmation("WOETH", [
@@ -1527,11 +1526,6 @@ const deployWOeth = async () => {
15271526
// eslint-disable-next-line no-unexpected-multiline
15281527
"initialize(address,address,bytes)"
15291528
](dWrappedOethImpl.address, governorAddr, initData);
1530-
1531-
await woeth.connect(sGovernor)[
1532-
// eslint-disable-next-line no-unexpected-multiline
1533-
"initialize2()"
1534-
]();
15351529
};
15361530

15371531
const deployOETHSwapper = async () => {

0 commit comments

Comments
 (0)