@@ -34,10 +34,10 @@ contract ReallocateWithdrawTest is IntegrationTest {
3434 }
3535
3636 function testReallocateWithdrawMax () public {
37- allocations.push (MarketAllocation (allMarkets[0 ], 0 ));
38- allocations.push (MarketAllocation (allMarkets[1 ], 0 ));
39- allocations.push (MarketAllocation (allMarkets[2 ], 0 ));
40- allocations.push (MarketAllocation (idleParams, type (uint256 ).max));
37+ allocations.push (MarketAllocation ({marketParams: allMarkets[0 ], assets: 0 } ));
38+ allocations.push (MarketAllocation ({marketParams: allMarkets[1 ], assets: 0 } ));
39+ allocations.push (MarketAllocation ({marketParams: allMarkets[2 ], assets: 0 } ));
40+ allocations.push (MarketAllocation ({marketParams: idleParams, assets: type (uint256 ).max} ));
4141
4242 vm.expectEmit ();
4343 emit EventsLib.ReallocateWithdraw (
@@ -72,7 +72,7 @@ contract ReallocateWithdrawTest is IntegrationTest {
7272 morpho.supply (allMarkets[0 ], 1 , 0 , address (vault), hex "" );
7373 vm.stopPrank ();
7474
75- allocations.push (MarketAllocation (allMarkets[0 ], 0 ));
75+ allocations.push (MarketAllocation ({marketParams: allMarkets[0 ], assets: 0 } ));
7676
7777 vm.prank (ALLOCATOR);
7878 vm.expectRevert (abi.encodeWithSelector (ErrorsLib.MarketNotEnabled.selector , allMarkets[0 ].id ()));
@@ -95,11 +95,11 @@ contract ReallocateWithdrawTest is IntegrationTest {
9595 assets[1 ] = morpho.expectedSupplyAssets (allMarkets[1 ], address (vault));
9696 assets[2 ] = morpho.expectedSupplyAssets (allMarkets[2 ], address (vault));
9797
98- allocations.push (MarketAllocation (idleParams, 0 ));
99- allocations.push (MarketAllocation (allMarkets[0 ], newAssets[0 ]));
100- allocations.push (MarketAllocation (allMarkets[1 ], newAssets[1 ]));
101- allocations.push (MarketAllocation (allMarkets[2 ], newAssets[2 ]));
102- allocations.push (MarketAllocation (idleParams, type (uint256 ).max));
98+ allocations.push (MarketAllocation ({marketParams: idleParams, assets: 0 } ));
99+ allocations.push (MarketAllocation ({marketParams: allMarkets[0 ], assets: newAssets[0 ]} ));
100+ allocations.push (MarketAllocation ({marketParams: allMarkets[1 ], assets: newAssets[1 ]} ));
101+ allocations.push (MarketAllocation ({marketParams: allMarkets[2 ], assets: newAssets[2 ]} ));
102+ allocations.push (MarketAllocation ({marketParams: idleParams, assets: type (uint256 ).max} ));
103103
104104 uint256 expectedIdle = _idle () + 3 * CAP2 - newAssets[0 ] - newAssets[1 ] - newAssets[2 ];
105105
@@ -141,9 +141,9 @@ contract ReallocateWithdrawTest is IntegrationTest {
141141 function testReallocateWithdrawIncreaseSupply () public {
142142 _setCap (allMarkets[2 ], 3 * CAP2);
143143
144- allocations.push (MarketAllocation (allMarkets[0 ], 0 ));
145- allocations.push (MarketAllocation (allMarkets[1 ], 0 ));
146- allocations.push (MarketAllocation (allMarkets[2 ], 3 * CAP2));
144+ allocations.push (MarketAllocation ({marketParams: allMarkets[0 ], assets: 0 } ));
145+ allocations.push (MarketAllocation ({marketParams: allMarkets[1 ], assets: 0 } ));
146+ allocations.push (MarketAllocation ({marketParams: allMarkets[2 ], assets: 3 * CAP2} ));
147147
148148 vm.expectEmit ();
149149 emit EventsLib.ReallocateWithdraw (
@@ -175,25 +175,25 @@ contract ReallocateWithdrawTest is IntegrationTest {
175175
176176 _setCap (allMarkets[1 ], 0 );
177177
178- allocations.push (MarketAllocation (allMarkets[0 ], 0 ));
179- allocations.push (MarketAllocation (allMarkets[1 ], 0 ));
180- allocations.push (MarketAllocation (allMarkets[2 ], 0 ));
178+ allocations.push (MarketAllocation ({marketParams: allMarkets[0 ], assets: 0 } ));
179+ allocations.push (MarketAllocation ({marketParams: allMarkets[1 ], assets: 0 } ));
180+ allocations.push (MarketAllocation ({marketParams: allMarkets[2 ], assets: 0 } ));
181181
182- allocations.push (MarketAllocation (allMarkets[0 ], suppliedAssets[0 ]));
183- allocations.push (MarketAllocation (allMarkets[1 ], suppliedAssets[1 ]));
184- allocations.push (MarketAllocation (allMarkets[2 ], suppliedAssets[2 ]));
182+ allocations.push (MarketAllocation ({marketParams: allMarkets[0 ], assets: suppliedAssets[0 ]} ));
183+ allocations.push (MarketAllocation ({marketParams: allMarkets[1 ], assets: suppliedAssets[1 ]} ));
184+ allocations.push (MarketAllocation ({marketParams: allMarkets[2 ], assets: suppliedAssets[2 ]} ));
185185
186186 vm.prank (ALLOCATOR);
187187 vm.expectRevert (abi.encodeWithSelector (ErrorsLib.UnauthorizedMarket.selector , allMarkets[1 ].id ()));
188188 vault.reallocate (allocations);
189189 }
190190
191191 function testReallocateSupplyCapExceeded () public {
192- allocations.push (MarketAllocation (allMarkets[0 ], 0 ));
193- allocations.push (MarketAllocation (allMarkets[1 ], 0 ));
194- allocations.push (MarketAllocation (allMarkets[2 ], 0 ));
192+ allocations.push (MarketAllocation ({marketParams: allMarkets[0 ], assets: 0 } ));
193+ allocations.push (MarketAllocation ({marketParams: allMarkets[1 ], assets: 0 } ));
194+ allocations.push (MarketAllocation ({marketParams: allMarkets[2 ], assets: 0 } ));
195195
196- allocations.push (MarketAllocation (allMarkets[0 ], CAP2 + 1 ));
196+ allocations.push (MarketAllocation ({marketParams: allMarkets[0 ], assets: CAP2 + 1 } ));
197197
198198 vm.prank (ALLOCATOR);
199199 vm.expectRevert (abi.encodeWithSelector (ErrorsLib.SupplyCapExceeded.selector , allMarkets[0 ].id ()));
@@ -207,8 +207,8 @@ contract ReallocateWithdrawTest is IntegrationTest {
207207
208208 _setCap (allMarkets[0 ], type (uint184 ).max);
209209
210- allocations.push (MarketAllocation (idleParams, 0 ));
211- allocations.push (MarketAllocation (allMarkets[0 ], 2 * CAP2 + rewards));
210+ allocations.push (MarketAllocation ({marketParams: idleParams, assets: 0 } ));
211+ allocations.push (MarketAllocation ({marketParams: allMarkets[0 ], assets: 2 * CAP2 + rewards} ));
212212
213213 vm.prank (ALLOCATOR);
214214 vm.expectRevert (ErrorsLib.InconsistentReallocation.selector );
0 commit comments