Skip to content

Commit d5fd2cd

Browse files
authored
deploy pb structure on base (#2636)
1 parent a8be73b commit d5fd2cd

13 files changed

Lines changed: 2858 additions & 1 deletion
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
const { deployOnBase } = require("../../utils/deploy-l2");
2+
const addresses = require("../../utils/addresses");
3+
const {
4+
deployWithConfirmation,
5+
withConfirmation,
6+
} = require("../../utils/deploy.js");
7+
8+
module.exports = deployOnBase(
9+
{
10+
deployName: "039_pool_booster_factory",
11+
},
12+
async ({ ethers }) => {
13+
const { deployerAddr } = await getNamedAccounts();
14+
const sDeployer = await ethers.provider.getSigner(deployerAddr);
15+
16+
// 1. Fetch contracts
17+
const cOETHbProxy = await ethers.getContract("OETHBaseProxy");
18+
19+
// 2. Deploy PoolBooster Central Registry (proxy + implementation)
20+
await deployWithConfirmation("PoolBoostCentralRegistryProxy", []);
21+
const cPoolBoostCentralRegistryProxy = await ethers.getContract(
22+
"PoolBoostCentralRegistryProxy"
23+
);
24+
console.log(
25+
`Pool boost central registry proxy deployed: ${cPoolBoostCentralRegistryProxy.address}`
26+
);
27+
28+
const dPoolBoostCentralRegistry = await deployWithConfirmation(
29+
"PoolBoostCentralRegistry",
30+
[]
31+
);
32+
console.log(
33+
`Deployed Pool Boost Central Registry to ${dPoolBoostCentralRegistry.address}`
34+
);
35+
const cPoolBoostCentralRegistry = await ethers.getContractAt(
36+
"PoolBoostCentralRegistry",
37+
cPoolBoostCentralRegistryProxy.address
38+
);
39+
40+
// prettier-ignore
41+
await withConfirmation(
42+
cPoolBoostCentralRegistryProxy
43+
.connect(sDeployer)["initialize(address,address,bytes)"](
44+
dPoolBoostCentralRegistry.address,
45+
addresses.base.timelock,
46+
"0x"
47+
)
48+
);
49+
console.log(
50+
"Initialized PoolBoostCentralRegistry proxy and implementation"
51+
);
52+
53+
// 3. Deploy PoolBoosterFactory for Merkl
54+
const dPoolBoosterFactory = await deployWithConfirmation(
55+
"PoolBoosterFactoryMerkl_v1",
56+
[
57+
cOETHbProxy.address,
58+
addresses.base.multichainStrategist,
59+
cPoolBoostCentralRegistryProxy.address,
60+
addresses.base.MerklDistributor,
61+
],
62+
"PoolBoosterFactoryMerkl"
63+
);
64+
console.log(
65+
`Pool Booster Merkl Factory deployed to ${dPoolBoosterFactory.address}`
66+
);
67+
68+
return {
69+
actions: [
70+
{
71+
// set the factory as an approved one
72+
contract: cPoolBoostCentralRegistry,
73+
signature: "approveFactory(address)",
74+
args: [dPoolBoosterFactory.address],
75+
},
76+
],
77+
};
78+
}
79+
);

contracts/deployments/base/.migrations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@
3535
"035_claimbribes_module_old_guardian": 1751363893,
3636
"036_oethb_upgrade_EIP7702": 1751453912,
3737
"037_deploy_harvester": 1752034150,
38-
"038_vault_upgrade": 1752579215
38+
"038_vault_upgrade": 1752579215,
39+
"039_pool_booster_factory": 1756293140
3940
}

contracts/deployments/base/PoolBoostCentralRegistry.json

Lines changed: 418 additions & 0 deletions
Large diffs are not rendered by default.

contracts/deployments/base/PoolBoostCentralRegistryProxy.json

Lines changed: 297 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)