Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M-02 addendum #1930

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions contracts/contracts/proxies/Proxies.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,16 @@ contract OETHBalancerMetaPoolwstEthStrategyProxy is

}

/**
* @notice OETHBalancerComposablePoolwstEthStrategyProxy delegates calls to a
* BalancerComposablePoolStrategy implementation
*/
contract OETHBalancerComposablePoolwstEthStrategyProxy is
InitializeGovernedUpgradeabilityProxy
{

}

/**
* @notice OETHBalancerCompPoolSfrxEthWstETHrETHStrategyProxy delegates calls to a
* BalancerComposablePoolStrategy implementation
Expand Down
78 changes: 77 additions & 1 deletion contracts/test/fixture/_fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const {
const {
balancer_rETH_WETH_PID,
balancer_stETH_WETH_PID,
balancer_stETH_WETH_COMPOSABLE_PID,
balancer_wstETH_sfrxETH_rETH_PID,
} = require("../../utils/constants");
const {
Expand Down Expand Up @@ -52,6 +53,7 @@ const sfrxETHAbi = require("../abi/sfrxETH.json");

const { defaultAbiCoder, parseUnits, parseEther } = require("ethers/lib/utils");
const balancerStrategyDeployment = require("../../utils/balancerStrategyDeployment");
const balancerComposableStrategyDeployment = require("../../utils/balancerComposableStrategyDeployment");
const { impersonateAndFund } = require("../../utils/signers");

const log = require("../../utils/logger")("test:fixtures");
Expand Down Expand Up @@ -1086,7 +1088,80 @@ async function balancerSfrxETHRETHWstETHBrokenWithdrawalFixture() {
}

/**
* Configure a Vault with the balancer strategy for wstETH/WETH pool
* Configure a Vault with the Balancer Composable strategy for wstETH/WETH pool
*/
async function balancerWstEthComposableFixture() {
const fixture = await defaultFixture();

const d = balancerComposableStrategyDeployment({
deploymentOpts: {
deployName: "99998_balancer_composable_wstETH_WETH",
forceDeploy: true,
deployerIsProposer: true,
reduceQueueTime: true,
},
proxyContractName: "OETHBalancerComposablePoolwstEthStrategyProxy",

platformAddress: addresses.mainnet.wstETH_WETH_COMPOSABLE_BPT,
poolId: balancer_stETH_WETH_COMPOSABLE_PID,

auraRewardsContractAddress:
addresses.mainnet.wstETH_WETH_COMPOSABLE_AuraRewards,
positionOfTheBPTToken: 1,
rewardTokenAddresses: [addresses.mainnet.BAL, addresses.mainnet.AURA],
assets: [addresses.mainnet.stETH, addresses.mainnet.WETH],
});

await d(hre);

const balancerWstEthComposableStrategyProxy = await ethers.getContract(
"OETHBalancerComposablePoolwstEthStrategyProxy"
);
const balancerWstEthComposableStrategy = await ethers.getContractAt(
"BalancerComposablePoolStrategy",
balancerWstEthComposableStrategyProxy.address
);

fixture.balancerWstEthComposableStrategy = balancerWstEthComposableStrategy;

const { oethVault, timelock, weth, stETH, josh } = fixture;

await oethVault
.connect(timelock)
.setAssetDefaultStrategy(
stETH.address,
balancerWstEthComposableStrategy.address
);
await oethVault
.connect(timelock)
.setAssetDefaultStrategy(
weth.address,
balancerWstEthComposableStrategy.address
);

fixture.stEthComposableBPT = await ethers.getContractAt(
"IERC20Metadata",
addresses.mainnet.wstETH_WETH_COMPOSABLE_BPT,
josh
);
fixture.balancerWstEthComposablePID = balancer_stETH_WETH_COMPOSABLE_PID;

fixture.auraPool = await ethers.getContractAt(
"IERC4626",
addresses.mainnet.wstETH_WETH_COMPOSABLE_AuraRewards
);

fixture.balancerVault = await ethers.getContractAt(
"IBalancerVault",
addresses.mainnet.balancerVault,
josh
);

return fixture;
}

/**
* Configure a Vault with the Balancer strategy for wstETH/WETH pool
*/
async function balancerWstEthFixture() {
const fixture = await defaultFixture();
Expand Down Expand Up @@ -2100,6 +2175,7 @@ module.exports = {
balancerREthFixture,
balancerFrxETHwstETHeETHFixture,
balancerWstEthFixture,
balancerWstEthComposableFixture,
fraxETHStrategyFixture,
oethMorphoAaveFixture,
oeth1InchSwapperFixture,
Expand Down
Loading
Loading