diff --git a/test/FeeCalculator.t.sol b/test/FeeCalculator.t.sol index 8daf281..c5c2137 100644 --- a/test/FeeCalculator.t.sol +++ b/test/FeeCalculator.t.sol @@ -81,7 +81,7 @@ contract FeeCalculatorTest is Test { // Assert assertEq(feeDistribution.recipients.length, feeDistribution.shares.length, "array length mismatch"); assertEq(recipients[0], feeRecipient); - assertEq(fees[0], 9718378209069523938); + assertEq(fees[0], 12811562752294360125); } function testCalculateRedemptionFeesNormalCase() public { @@ -187,9 +187,9 @@ contract FeeCalculatorTest is Test { // Assert assertEq(recipients[0], feeRecipient1); assertEq(recipients[1], feeRecipient2); - assertEq(fees.sumOf(), 9718378209069523938); - assertEq(fees[0], 9718378209069523938 / 2); - assertEq(fees[1], 9718378209069523938 / 2); + assertEq(fees.sumOf(), 12811562752294360125); + assertEq(fees[0], uint256(12811562752294360125) / 2 + 1); + assertEq(fees[1], uint256(12811562752294360125) / 2); } function testCalculateDepositFeesNormalCase_TwoFeeRecipientsSplit30To70() public { @@ -220,9 +220,9 @@ contract FeeCalculatorTest is Test { // Assert assertEq(recipients[0], feeRecipient1); assertEq(recipients[1], feeRecipient2); - assertEq(fees.sumOf(), 9718378209069523938); - assertEq(fees[0], uint256(9718378209069523938) * 30 / 100 + 1); //first recipient gets rest from division - assertEq(fees[1], uint256(9718378209069523938) * 70 / 100); + assertEq(fees.sumOf(), 12811562752294360125); + assertEq(fees[0], uint256(12811562752294360125) * 30 / 100 + 1); //first recipient gets rest from division + assertEq(fees[1], uint256(12811562752294360125) * 70 / 100); } function testCalculateDepositFeesComplicatedCase() public { @@ -242,7 +242,7 @@ contract FeeCalculatorTest is Test { // Assert assertEq(recipients[0], feeRecipient); - assertEq(fees[0], 46413457506542766270); + assertEq(fees[0], 53013879215838797358); } function testCalculateDepositFees_DepositOfOneWei_ShouldThrowException() public { @@ -293,7 +293,7 @@ contract FeeCalculatorTest is Test { // Assert assertEq(recipients[0], feeRecipient); - assertEq(fees[0], 158800759314); + assertEq(fees[0], 170744712050); } function testCalculateDepositFees_DepositOfOne_NormalFee() public { @@ -313,7 +313,7 @@ contract FeeCalculatorTest is Test { // Assert assertEq(recipients[0], feeRecipient); - assertEq(fees[0], 15880809772898785); + assertEq(fees[0], 17075278992520605); } function testCalculateDepositFees_DepositOfOne_NormalFee_FiveRecipientsEqualSplit() public { @@ -356,12 +356,12 @@ contract FeeCalculatorTest is Test { assertEq(recipients[2], feeRecipient3); assertEq(recipients[3], feeRecipient4); assertEq(recipients[4], feeRecipient5); - assertEq(fees.sumOf(), 15880809772898785); - assertEq(fees[0], uint256(15880809772898785) * 20 / 100); - assertEq(fees[1], uint256(15880809772898785) * 20 / 100); - assertEq(fees[2], uint256(15880809772898785) * 20 / 100); - assertEq(fees[3], uint256(15880809772898785) * 20 / 100); - assertEq(fees[4], uint256(15880809772898785) * 20 / 100); + assertEq(fees.sumOf(), 17075278992520605); + assertEq(fees[0], uint256(17075278992520605) * 20 / 100); + assertEq(fees[1], uint256(17075278992520605) * 20 / 100); + assertEq(fees[2], uint256(17075278992520605) * 20 / 100); + assertEq(fees[3], uint256(17075278992520605) * 20 / 100); + assertEq(fees[4], uint256(17075278992520605) * 20 / 100); } function testCalculateDepositFees_DepositOfOne_NormalFee_FiveRecipientsComplicatedSplit() public {