From b7b841ed36b3939ac2419087f1040bf64394d05f Mon Sep 17 00:00:00 2001 From: Michalis Kargakis Date: Wed, 24 Apr 2024 12:12:31 +0200 Subject: [PATCH] Fix compiler warnings in flat fee calculator --- src/FlatFeeCalculator.sol | 15 ++++----------- .../FlatFeeCalculator.fuzzy.t.sol | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/FlatFeeCalculator.sol b/src/FlatFeeCalculator.sol index 121610c..c4ac55f 100644 --- a/src/FlatFeeCalculator.sol +++ b/src/FlatFeeCalculator.sol @@ -58,12 +58,10 @@ contract FlatFeeCalculator is IFeeCalculator, Ownable { } /// @notice Calculates the deposit fee for a given amount. - /// @param pool The address of the pool. - /// @param tco2 The address of the TCO2 token. /// @param depositAmount The amount to be deposited. /// @return feeDistribution How the fee is meant to be /// distributed among the fee recipients. - function calculateDepositFees(address pool, address tco2, uint256 depositAmount) + function calculateDepositFees(address, address, uint256 depositAmount) external view override @@ -98,12 +96,11 @@ contract FlatFeeCalculator is IFeeCalculator, Ownable { } /// @notice Calculates the redemption fees for a given amount. - /// @param pool The address of the pool. /// @param tco2s The addresses of the TCO2 token. /// @param redemptionAmounts The amounts to be redeemed. /// @return feeDistribution How the fee is meant to be /// distributed among the fee recipients. - function calculateRedemptionFees(address pool, address[] calldata tco2s, uint256[] calldata redemptionAmounts) + function calculateRedemptionFees(address, address[] calldata tco2s, uint256[] calldata redemptionAmounts) external view override @@ -117,13 +114,10 @@ contract FlatFeeCalculator is IFeeCalculator, Ownable { } /// @notice Calculates the deposit fee for a given amount of an ERC1155 project. - /// @param pool The address of the pool. - /// @param erc1155 The address of the ERC1155 project - /// @param tokenId The tokenId of the vintage. /// @param depositAmount The amount to be deposited. /// @return feeDistribution How the fee is meant to be /// distributed among the fee recipients. - function calculateDepositFees(address pool, address erc1155, uint256 tokenId, uint256 depositAmount) + function calculateDepositFees(address, address, uint256, uint256 depositAmount) external view override @@ -135,14 +129,13 @@ contract FlatFeeCalculator is IFeeCalculator, Ownable { } /// @notice Calculates the redemption fees for a given amount on ERC1155 projects. - /// @param pool The address of the pool. /// @param erc1155s The addresses of the ERC1155 projects. /// @param tokenIds The tokenIds of the project vintages. /// @param redemptionAmounts The amounts to be redeemed. /// @return feeDistribution How the fee is meant to be /// distributed among the fee recipients. function calculateRedemptionFees( - address pool, + address, address[] calldata erc1155s, uint256[] calldata tokenIds, uint256[] calldata redemptionAmounts diff --git a/test/FlatFeeCalculatorFuzzy/FlatFeeCalculator.fuzzy.t.sol b/test/FlatFeeCalculatorFuzzy/FlatFeeCalculator.fuzzy.t.sol index 0397b0c..7b2c7a5 100644 --- a/test/FlatFeeCalculatorFuzzy/FlatFeeCalculator.fuzzy.t.sol +++ b/test/FlatFeeCalculatorFuzzy/FlatFeeCalculator.fuzzy.t.sol @@ -136,7 +136,7 @@ contract FlatFeeCalculatorTestFuzzy is Test { // Act vm.expectRevert("Fee must be greater than 0"); - FeeDistribution memory feeDistribution = feeCalculator.calculateDepositFees(empty, empty, depositAmount); + feeCalculator.calculateDepositFees(empty, empty, depositAmount); } function testCalculateDepositFee_TCO2(uint256 depositAmount) public {