From c85240665b64a0913a2d25a08350aa5ab7b4d9af Mon Sep 17 00:00:00 2001 From: Michalis Kargakis <kargakis@protonmail.com> Date: Thu, 21 Dec 2023 12:30:16 +0100 Subject: [PATCH] Pin contract versions This is a recommended practice by security auditors, also prb-math requires 0.8.19 version so pin the main fee calculator contract to 0.8.19. This change aligns the OZ contract version with the version used in the rest of the Toucan protocols which will reduce the effort we will need to spend during auditing. --- lib/openzeppelin-contracts | 2 +- remappings.txt | 1 + src/FeeCalculator.sol | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts index 932fddf..d4fb3a8 160000 --- a/lib/openzeppelin-contracts +++ b/lib/openzeppelin-contracts @@ -1 +1 @@ -Subproject commit 932fddf69a699a9a80fd2396fd1a2ab91cdda123 +Subproject commit d4fb3a89f9d0a39c7ee6f2601d33ffbf30085322 diff --git a/remappings.txt b/remappings.txt index ca4f880..55ee37f 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1 +1,2 @@ @prb/math/=lib/prb-math/ +@openzeppelin=lib/openzeppelin-contracts/ \ No newline at end of file diff --git a/src/FeeCalculator.sol b/src/FeeCalculator.sol index 3fd02c2..353ee2e 100644 --- a/src/FeeCalculator.sol +++ b/src/FeeCalculator.sol @@ -3,7 +3,7 @@ // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <info@neutralx.com> -pragma solidity ^0.8.13; +pragma solidity 0.8.19; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; @@ -36,7 +36,7 @@ contract FeeCalculator is IFeeCalculator, Ownable { address[] private _recipients; uint256[] private _shares; - constructor() Ownable(msg.sender) {} + constructor() Ownable() {} /// @notice Sets the deposit fee scale. /// @dev Can only be called by the current owner.