Skip to content

Commit

Permalink
Merge pull request #54 from 0xmichalis/compiler-warnings-fixed
Browse files Browse the repository at this point in the history
Fix compiler warnings in flat fee calculator
  • Loading branch information
0xmichalis authored Apr 24, 2024
2 parents 12ad5fc + b7b841e commit 09f9cdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
15 changes: 4 additions & 11 deletions src/FlatFeeCalculator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/FlatFeeCalculatorFuzzy/FlatFeeCalculator.fuzzy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 09f9cdd

Please sign in to comment.