|
| 1 | +const { deploymentWithGovernanceProposal } = require("../utils/deploy"); |
| 2 | +const addresses = require("../utils/addresses"); |
| 3 | +const { balancer_rETH_WETH_PID } = require("../utils/constants"); |
| 4 | + |
| 5 | +const platformAddress = addresses.mainnet.rETH_WETH_BPT; |
| 6 | + |
| 7 | +module.exports = deploymentWithGovernanceProposal( |
| 8 | + { |
| 9 | + deployName: "077_balancer_rETH_WETH", |
| 10 | + forceDeploy: false, |
| 11 | + //forceSkip: true, |
| 12 | + deployerIsProposer: false, |
| 13 | + //proposalId: , |
| 14 | + }, |
| 15 | + async ({ deployWithConfirmation, ethers }) => { |
| 16 | + // Current contracts |
| 17 | + const cOETHVaultProxy = await ethers.getContract("OETHVaultProxy"); |
| 18 | + |
| 19 | + // Deployer Actions |
| 20 | + // ---------------- |
| 21 | + const cOETHBalancerMetaPoolStrategyProxy = await ethers.getContract( |
| 22 | + "OETHBalancerMetaPoolrEthStrategyProxy" |
| 23 | + ); |
| 24 | + |
| 25 | + // 1. Deploy new Balancer strategy implementation |
| 26 | + const dOETHBalancerMetaPoolStrategyImpl = await deployWithConfirmation( |
| 27 | + "BalancerMetaPoolStrategy", |
| 28 | + [ |
| 29 | + [platformAddress, cOETHVaultProxy.address], |
| 30 | + [ |
| 31 | + addresses.mainnet.rETH, |
| 32 | + addresses.mainnet.stETH, |
| 33 | + addresses.mainnet.wstETH, |
| 34 | + addresses.mainnet.frxETH, |
| 35 | + addresses.mainnet.sfrxETH, |
| 36 | + addresses.mainnet.balancerVault, // Address of the Balancer vault |
| 37 | + balancer_rETH_WETH_PID, // Pool ID of the Balancer pool |
| 38 | + ], |
| 39 | + addresses.mainnet.rETH_WETH_AuraRewards, // Address of the Aura rewards contract |
| 40 | + ] |
| 41 | + ); |
| 42 | + |
| 43 | + console.log( |
| 44 | + "Balancer strategy address:", |
| 45 | + cOETHBalancerMetaPoolStrategyProxy.address |
| 46 | + ); |
| 47 | + |
| 48 | + // Governance Actions |
| 49 | + // ---------------- |
| 50 | + return { |
| 51 | + name: "Deploy new implementation of Balancer rETH/WETH MetaPool strategy\n\ |
| 52 | + \n\ |
| 53 | + The new implementation of the Balancer rETH/WETH strategy pool fixes a medium vulnerability of the strategy's checkBalance function.\n\ |
| 54 | + \n\ |
| 55 | + ", |
| 56 | + actions: [ |
| 57 | + // 1. Upgrade strategy implementation |
| 58 | + { |
| 59 | + contract: cOETHBalancerMetaPoolStrategyProxy, |
| 60 | + signature: "upgradeTo(address)", |
| 61 | + args: [dOETHBalancerMetaPoolStrategyImpl.address], |
| 62 | + }, |
| 63 | + ], |
| 64 | + }; |
| 65 | + } |
| 66 | +); |
0 commit comments