Skip to content

Commit

Permalink
fix: upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinEgalite committed Oct 13, 2022
1 parent 9279c6b commit ff82027
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test-foundry/prod/aave-v2/TestLens.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ contract TestLens is TestSetup {
uint256 poolBorrowIndex;
}

function testUpgradeLens() public {
function testIndexesShouldBeEqualAfterUpgrade() public {
Lens lensImplV2 = new Lens(address(morpho));

address[] memory marketsCreated = lens.getAllMarkets();
Vars[] memory expectedValues = new Vars[](marketsCreated.length);

vm.prank(proxyAdmin.owner());
proxyAdmin.upgrade(lensProxy, address(lensImplV2));

for (uint256 i; i < marketsCreated.length; ++i) {
address market = marketsCreated[i];
if (market == aStEth) continue;
Expand All @@ -41,6 +38,9 @@ contract TestLens is TestSetup {
expectedValues[i].poolBorrowIndex = poolBorrowIndex;
}

vm.prank(proxyAdmin.owner());
proxyAdmin.upgrade(lensProxy, address(lensImplV2));

for (uint256 i; i < marketsCreated.length; ++i) {
address market = marketsCreated[i];
if (market == aStEth) continue;
Expand Down

0 comments on commit ff82027

Please sign in to comment.