-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
M-01-late Balancer Review: more robust withdraw from strategies (#1928)
* make VaultAdmin not fail when withdrawing from all of the strategis when withdrawAll from a strategy fails * add a separate withdrawal function * remove only * fix fork tests
- Loading branch information
1 parent
0ec02f1
commit 8db6593
Showing
10 changed files
with
205 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
contracts/contracts/mocks/BalancerComposablePoolBrokenTestStrategy.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
/** | ||
* @title OETH Balancer BalancerComposablePoolTest Strategy | ||
* This one is required to expose internal functions to our test suite. In fixtures | ||
* we replace the mainnet byte code with the one from this contract. | ||
* | ||
* @author Origin Protocol Inc | ||
*/ | ||
import { BalancerComposablePoolStrategy } from "../strategies/balancer/BalancerComposablePoolStrategy.sol"; | ||
|
||
contract BalancerComposablePoolBrokenTestStrategy is | ||
BalancerComposablePoolStrategy | ||
{ | ||
constructor( | ||
BaseStrategyConfig memory _stratConfig, | ||
BaseBalancerConfig memory _balancerConfig, | ||
address _auraRewardPoolAddress, | ||
uint256 _bptTokenPoolPosition | ||
) | ||
BalancerComposablePoolStrategy( | ||
_stratConfig, | ||
_balancerConfig, | ||
_auraRewardPoolAddress, | ||
_bptTokenPoolPosition | ||
) | ||
{} | ||
|
||
function withdrawAll() external override onlyVaultOrGovernor nonReentrant { | ||
require(false, "Simulating a failed call"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters