Skip to content

Commit d80141d

Browse files
authored
[MerklPB] Deploy Mainnet and Base MerklPBFactory and Implementation. (#2828)
1 parent ee0d1e8 commit d80141d

19 files changed

Lines changed: 5081 additions & 178 deletions
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
const { deployOnBaseWithEOA } = require("../../utils/deploy-l2");
2+
const { deployWithConfirmation } = require("../../utils/deploy");
3+
const addresses = require("../../utils/addresses");
4+
5+
module.exports = deployOnBaseWithEOA(
6+
{
7+
deployName: "045_deploy_pool_booster_merkl_factory",
8+
},
9+
async ({ ethers }) => {
10+
const { deployerAddr } = await getNamedAccounts();
11+
12+
const cPoolBoostCentralRegistryProxy = await ethers.getContract(
13+
"PoolBoostCentralRegistryProxy"
14+
);
15+
const oethBaseProxy = await ethers.getContract("OETHBaseProxy");
16+
17+
// ---------------------------------------------------------------------------------------------------------
18+
// --- 1. Deploy PoolBoosterMerklV2 (implementation for beacon proxies)
19+
// ---------------------------------------------------------------------------------------------------------
20+
const dPoolBoosterMerklV2 = await deployWithConfirmation(
21+
"PoolBoosterMerklV2",
22+
[]
23+
);
24+
console.log(
25+
`PoolBoosterMerklV2 deployed to ${dPoolBoosterMerklV2.address}`
26+
);
27+
28+
// ---------------------------------------------------------------------------------------------------------
29+
// --- 2. Deploy UpgradeableBeacon pointing to PoolBoosterMerklV2
30+
// ---------------------------------------------------------------------------------------------------------
31+
const dUpgradeableBeacon = await deployWithConfirmation(
32+
"UpgradeableBeacon",
33+
[dPoolBoosterMerklV2.address]
34+
);
35+
// Transfer beacon ownership from deployer to multichainStrategist
36+
const cBeacon = await ethers.getContractAt(
37+
"UpgradeableBeacon",
38+
dUpgradeableBeacon.address
39+
);
40+
const sDeployer = ethers.provider.getSigner(deployerAddr);
41+
await cBeacon
42+
.connect(sDeployer)
43+
.transferOwnership(addresses.multichainStrategist);
44+
console.log(`UpgradeableBeacon deployed to ${dUpgradeableBeacon.address}`);
45+
46+
// ---------------------------------------------------------------------------------------------------------
47+
// --- 3. Deploy PoolBoosterFactoryMerkl
48+
// ---------------------------------------------------------------------------------------------------------
49+
const dFactory = await deployWithConfirmation(
50+
"PoolBoosterFactoryMerkl",
51+
[
52+
oethBaseProxy.address,
53+
addresses.multichainStrategist,
54+
cPoolBoostCentralRegistryProxy.address,
55+
dUpgradeableBeacon.address,
56+
],
57+
"PoolBoosterFactoryMerkl",
58+
true
59+
);
60+
console.log(`PoolBoosterFactoryMerkl deployed to ${dFactory.address}`);
61+
62+
// NOTE: Registry approveFactory/removeFactory must be called by the
63+
// multichain strategist safe (registry governance was transferred).
64+
}
65+
);

contracts/deploy/mainnet/175_deploy_pool_booster_merkl_factory.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,17 @@ const main = async () => {
5252
// ---------------------------------------------------------------------------------------------------------
5353
// --- 3. Deploy PoolBoosterFactoryMerkl
5454
// ---------------------------------------------------------------------------------------------------------
55-
const dFactory = await deployWithConfirmation("PoolBoosterFactoryMerkl", [
56-
oethProxy.address,
57-
addresses.multichainStrategist,
58-
cPoolBoostCentralRegistryProxy.address,
59-
dUpgradeableBeacon.address,
60-
]);
55+
const dFactory = await deployWithConfirmation(
56+
"PoolBoosterFactoryMerkl",
57+
[
58+
oethProxy.address,
59+
addresses.multichainStrategist,
60+
cPoolBoostCentralRegistryProxy.address,
61+
dUpgradeableBeacon.address,
62+
],
63+
"PoolBoosterFactoryMerkl",
64+
true
65+
);
6166
console.log(`PoolBoosterFactoryMerkl deployed to ${dFactory.address}`);
6267

6368
// NOTE: Registry approveFactory/removeFactory must be called by the

contracts/deployments/base/.migrations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@
4141
"041_crosschain_strategy_proxies": 1770737618,
4242
"042_crosschain_strategy": 1770807435,
4343
"043_change_crosschain_strategy_operator": 1771403173,
44-
"044_bridge_helper_module": 1772010908
44+
"044_bridge_helper_module": 1772010908,
45+
"045_deploy_pool_booster_merkl_factory": 1772622327
4546
}

0 commit comments

Comments
 (0)