Skip to content

Commit

Permalink
fix: test on divested strategies
Browse files Browse the repository at this point in the history
  • Loading branch information
alcueca committed Jan 8, 2024
1 parent 10bdd1f commit 42252f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/Unwind.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ contract UnwindTest is PRBTest, StdCheats {
function setUp() public virtual {
// Instantiate the contract-under-test.
unwind = new Unwind();

for (uint i = 0; i < unwind.knownContractsLength(); i++) {
address target = unwind.knownContracts(i);
if (unwind.contractTypes(target) == Unwind.Type.STRATEGYV2 && IStrategy(target).state() == IStrategy.State.INVESTED) {
console2.log("%s: Divesting", ERC20(target).name());
IStrategy(target).divest();
console2.log("%s: Divested", ERC20(target).name());
}
}
}


Expand Down

0 comments on commit 42252f3

Please sign in to comment.