Skip to content

Commit d1ea868

Browse files
committed
fix: spelling
1 parent 5da98d4 commit d1ea868

File tree

3 files changed

+31
-27
lines changed

3 files changed

+31
-27
lines changed

packages/libs/contracts-sdk/test/fees/AaveFeeForkTest.t.sol

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@ contract FeeForkTest is Test {
113113
// advance timestamp to 1 week from now to accrue interest, to simulate profit
114114
// aave is rebasing so this should just be a bigger of aTokens after 1 week
115115
vm.warp(block.timestamp + 1 weeks);
116-
uint256 expectedTotalWithdrawl = aToken.balanceOf(address(aavePerfFeeFacet));
117-
console.log("expectedTotalWithdrawl - aka the aTokens in the fee contract after 1 week", expectedTotalWithdrawl);
118-
assertGt(expectedTotalWithdrawl, feeContractAaveTokens);
116+
uint256 expectedTotalWithdrawal = aToken.balanceOf(address(aavePerfFeeFacet));
117+
console.log(
118+
"expectedTotalWithdrawal - aka the aTokens in the fee contract after 1 week", expectedTotalWithdrawal
119+
);
120+
assertGt(expectedTotalWithdrawal, feeContractAaveTokens);
119121

120122
// now, do the withdrawal
121123
vm.startPrank(APP_USER_ALICE);
@@ -133,7 +135,7 @@ contract FeeForkTest is Test {
133135
uint256 userBalance = underlyingERC20.balanceOf(APP_USER_ALICE);
134136
uint256 feeContractBalance = underlyingERC20.balanceOf(address(aavePerfFeeFacet));
135137

136-
uint256 expectedTotalProfit = expectedTotalWithdrawl - depositAmount;
138+
uint256 expectedTotalProfit = expectedTotalWithdrawal - depositAmount;
137139
uint256 expectedUserProfit = expectedTotalProfit - (expectedTotalProfit * performanceFeePercentage / 10000);
138140
uint256 expectedFeeContractProfit = expectedTotalProfit * performanceFeePercentage / 10000;
139141
console.log("expectedTotalProfit", expectedTotalProfit);
@@ -291,9 +293,11 @@ contract FeeForkTest is Test {
291293
// advance timestamp to 1 week from now to accrue interest, to simulate profit
292294
// aave is rebasing so this should just be a bigger of aTokens after 1 week
293295
vm.warp(block.timestamp + 1 weeks);
294-
uint256 expectedTotalWithdrawl = aToken.balanceOf(address(aavePerfFeeFacet));
295-
console.log("expectedTotalWithdrawl - aka the aTokens in the fee contract after 1 week", expectedTotalWithdrawl);
296-
assertGt(expectedTotalWithdrawl, feeContractAaveTokens);
296+
uint256 expectedTotalWithdrawal = aToken.balanceOf(address(aavePerfFeeFacet));
297+
console.log(
298+
"expectedTotalWithdrawal - aka the aTokens in the fee contract after 1 week", expectedTotalWithdrawal
299+
);
300+
assertGt(expectedTotalWithdrawal, feeContractAaveTokens);
297301

298302
// now, do the withdrawal
299303
vm.startPrank(APP_USER_ALICE);
@@ -311,7 +315,7 @@ contract FeeForkTest is Test {
311315
uint256 userBalance = underlyingERC20.balanceOf(APP_USER_ALICE);
312316
uint256 feeContractBalance = underlyingERC20.balanceOf(address(aavePerfFeeFacet));
313317

314-
uint256 expectedTotalProfit = expectedTotalWithdrawl - depositAmount;
318+
uint256 expectedTotalProfit = expectedTotalWithdrawal - depositAmount;
315319
uint256 expectedUserProfit = expectedTotalProfit - (expectedTotalProfit * performanceFeePercentage / 10000);
316320
uint256 expectedFeeContractProfit = expectedTotalProfit * performanceFeePercentage / 10000;
317321
console.log("expectedTotalProfit", expectedTotalProfit);

packages/libs/contracts-sdk/test/fees/MorphoFee.t.sol

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ contract FeeTest is Test {
8383
mockERC20.mint(address(mockERC4626), 100);
8484

8585
// check that asset balance will be higher if we withdraw
86-
uint256 expectedTotalWithdrawl = mockERC4626.convertToAssets(d.vaultShares);
87-
console.log("expectedTotalWithdrawl", expectedTotalWithdrawl);
88-
assertEq(expectedTotalWithdrawl > depositAmount, true);
86+
uint256 expectedTotalWithdrawal = mockERC4626.convertToAssets(d.vaultShares);
87+
console.log("expectedTotalWithdrawal", expectedTotalWithdrawal);
88+
assertEq(expectedTotalWithdrawal > depositAmount, true);
8989

9090
vm.startPrank(APP_USER_ALICE);
9191
morphoPerfFeeFacet.withdrawFromMorpho(address(mockERC4626));
@@ -102,7 +102,7 @@ contract FeeTest is Test {
102102
uint256 userBalance = mockERC20.balanceOf(APP_USER_ALICE);
103103
uint256 feeContractBalance = mockERC20.balanceOf(address(morphoPerfFeeFacet));
104104

105-
uint256 expectedTotalProfit = expectedTotalWithdrawl - depositAmount;
105+
uint256 expectedTotalProfit = expectedTotalWithdrawal - depositAmount;
106106
uint256 expectedUserProfit = expectedTotalProfit - (expectedTotalProfit * performanceFeePercentage / 10000);
107107
uint256 expectedFeeContractProfit = expectedTotalProfit * performanceFeePercentage / 10000;
108108
console.log("expectedTotalProfit", expectedTotalProfit);
@@ -185,9 +185,9 @@ contract FeeTest is Test {
185185
mockERC20.mint(address(mockERC4626), 100);
186186

187187
// check that asset balance will be higher if we withdraw
188-
uint256 expectedTotalWithdrawl = mockERC4626.convertToAssets(d.vaultShares);
189-
console.log("expectedTotalWithdrawl", expectedTotalWithdrawl);
190-
assertEq(expectedTotalWithdrawl > depositAmount, true);
188+
uint256 expectedTotalWithdrawal = mockERC4626.convertToAssets(d.vaultShares);
189+
console.log("expectedTotalWithdrawal", expectedTotalWithdrawal);
190+
assertEq(expectedTotalWithdrawal > depositAmount, true);
191191

192192
vm.startPrank(APP_USER_ALICE);
193193
morphoPerfFeeFacet.withdrawFromMorpho(address(mockERC4626));
@@ -204,7 +204,7 @@ contract FeeTest is Test {
204204
uint256 userBalance = mockERC20.balanceOf(APP_USER_ALICE);
205205
uint256 feeContractBalance = mockERC20.balanceOf(address(morphoPerfFeeFacet));
206206

207-
uint256 expectedTotalProfit = expectedTotalWithdrawl - depositAmount;
207+
uint256 expectedTotalProfit = expectedTotalWithdrawal - depositAmount;
208208
uint256 expectedUserProfit = expectedTotalProfit - (expectedTotalProfit * performanceFeePercentage / 10000);
209209
uint256 expectedFeeContractProfit = expectedTotalProfit * performanceFeePercentage / 10000;
210210
console.log("expectedTotalProfit", expectedTotalProfit);

packages/libs/contracts-sdk/test/fees/MorphoFeeForkTest.t.sol

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ contract FeeForkTest is Test {
119119
);
120120

121121
// check that asset balance will be higher if we withdraw
122-
uint256 expectedTotalWithdrawl = morphoVault.convertToAssets(d.vaultShares);
123-
console.log("expectedTotalWithdrawl", expectedTotalWithdrawl);
124-
assertEq(expectedTotalWithdrawl > depositAmount, true);
122+
uint256 expectedTotalWithdrawal = morphoVault.convertToAssets(d.vaultShares);
123+
console.log("expectedTotalWithdrawal", expectedTotalWithdrawal);
124+
assertEq(expectedTotalWithdrawal > depositAmount, true);
125125

126126
vm.startPrank(APP_USER_ALICE);
127127
morphoPerfFeeFacet.withdrawFromMorpho(address(morphoVault));
@@ -138,7 +138,7 @@ contract FeeForkTest is Test {
138138
uint256 userBalance = underlyingERC20.balanceOf(APP_USER_ALICE);
139139
uint256 feeContractBalance = underlyingERC20.balanceOf(address(morphoPerfFeeFacet));
140140

141-
uint256 expectedTotalProfit = expectedTotalWithdrawl - depositAmount;
141+
uint256 expectedTotalProfit = expectedTotalWithdrawal - depositAmount;
142142
uint256 expectedUserProfit = expectedTotalProfit - (expectedTotalProfit * performanceFeePercentage / 10000);
143143
uint256 expectedFeeContractProfit = expectedTotalProfit * performanceFeePercentage / 10000;
144144
console.log("expectedTotalProfit", expectedTotalProfit);
@@ -193,9 +193,9 @@ contract FeeForkTest is Test {
193193
assertEq(feeContractVaultShares, d.vaultShares);
194194

195195
// check that asset balance will be slightly lower if we withdraw now, due to fees / rounding
196-
uint256 expectedTotalWithdrawl = morphoVault.convertToAssets(d.vaultShares);
197-
console.log("expectedTotalWithdrawl", expectedTotalWithdrawl);
198-
assertEq(expectedTotalWithdrawl < depositAmount, true);
196+
uint256 expectedTotalWithdrawal = morphoVault.convertToAssets(d.vaultShares);
197+
console.log("expectedTotalWithdrawal", expectedTotalWithdrawal);
198+
assertEq(expectedTotalWithdrawal < depositAmount, true);
199199

200200
vm.startPrank(APP_USER_ALICE);
201201
morphoPerfFeeFacet.withdrawFromMorpho(address(morphoVault));
@@ -296,9 +296,9 @@ contract FeeForkTest is Test {
296296
);
297297

298298
// check that asset balance will be higher if we withdraw
299-
uint256 expectedTotalWithdrawl = morphoVault.convertToAssets(d.vaultShares);
300-
console.log("expectedTotalWithdrawl", expectedTotalWithdrawl);
301-
assertEq(expectedTotalWithdrawl > depositAmount, true);
299+
uint256 expectedTotalWithdrawal = morphoVault.convertToAssets(d.vaultShares);
300+
console.log("expectedTotalWithdrawal", expectedTotalWithdrawal);
301+
assertEq(expectedTotalWithdrawal > depositAmount, true);
302302

303303
vm.startPrank(APP_USER_ALICE);
304304
morphoPerfFeeFacet.withdrawFromMorpho(address(morphoVault));
@@ -315,7 +315,7 @@ contract FeeForkTest is Test {
315315
uint256 userBalance = underlyingERC20.balanceOf(APP_USER_ALICE);
316316
uint256 feeContractBalance = underlyingERC20.balanceOf(address(morphoPerfFeeFacet));
317317

318-
uint256 expectedTotalProfit = expectedTotalWithdrawl - depositAmount;
318+
uint256 expectedTotalProfit = expectedTotalWithdrawal - depositAmount;
319319
uint256 expectedUserProfit = expectedTotalProfit - (expectedTotalProfit * performanceFeePercentage / 10000);
320320
uint256 expectedFeeContractProfit = expectedTotalProfit * performanceFeePercentage / 10000;
321321
console.log("expectedTotalProfit", expectedTotalProfit);

0 commit comments

Comments
 (0)