From 0a957e59733ca79b3cf547974a39a3b435c87b0a Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Tue, 27 Feb 2024 12:35:27 +0530 Subject: [PATCH 1/5] fix: Scope 1. Misc. TimeManagerV8 --- contracts/TimeManagerV8.sol | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/contracts/TimeManagerV8.sol b/contracts/TimeManagerV8.sol index e36f339..ca1a63a 100644 --- a/contracts/TimeManagerV8.sol +++ b/contracts/TimeManagerV8.sol @@ -4,21 +4,24 @@ pragma solidity 0.8.13; import { SECONDS_PER_YEAR } from "./constants.sol"; abstract contract TimeManagerV8 { + /// @notice Stores blocksPerYear if isTimeBased is true else secondsPerYear is stored /// @custom:oz-upgrades-unsafe-allow state-variable-immutable uint256 public immutable blocksOrSecondsPerYear; + /// @notice Acknowledges if a contract is time based or not /// @custom:oz-upgrades-unsafe-allow state-variable-immutable bool public immutable isTimeBased; + /// @notice Stores the current block timestamp or block number depending on isTimeBased + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + function() view returns (uint256) private immutable _getCurrentSlot; + /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ - uint256[48] private __gap; - - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - function() view returns (uint256) private immutable _getCurrentSlot; + uint256[50] private __gap; /// @notice Thrown when blocks per year is invalid error InvalidBlocksPerYear(); From 1c452e2a14833716640458716bec6b1c6bf67ecf Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Fri, 1 Mar 2024 19:45:08 +0530 Subject: [PATCH 2/5] fix: revert change for gap variable --- contracts/TimeManagerV8.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/TimeManagerV8.sol b/contracts/TimeManagerV8.sol index ca1a63a..7c22190 100644 --- a/contracts/TimeManagerV8.sol +++ b/contracts/TimeManagerV8.sol @@ -21,7 +21,7 @@ abstract contract TimeManagerV8 { * variables without shifting down storage in the inheritance chain * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ - uint256[50] private __gap; + uint256[48] private __gap; /// @notice Thrown when blocks per year is invalid error InvalidBlocksPerYear(); From eec9785a45bbd5f01b42f8305d2cdff1d5bfe8a8 Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Mon, 4 Mar 2024 06:51:46 +0000 Subject: [PATCH 3/5] chore(release): 1.3.1-dev.1 [skip ci] ## [1.3.1-dev.1](https://github.com/VenusProtocol/solidity-utilities/compare/v1.3.0...v1.3.1-dev.1) (2024-03-04) ### Bug Fixes * revert change for gap variable ([1c452e2](https://github.com/VenusProtocol/solidity-utilities/commit/1c452e2a14833716640458716bec6b1c6bf67ecf)) * Scope 1. Misc. TimeManagerV8 ([0a957e5](https://github.com/VenusProtocol/solidity-utilities/commit/0a957e59733ca79b3cf547974a39a3b435c87b0a)) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e9e49..c4bcfc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.3.1-dev.1](https://github.com/VenusProtocol/solidity-utilities/compare/v1.3.0...v1.3.1-dev.1) (2024-03-04) + + +### Bug Fixes + +* revert change for gap variable ([1c452e2](https://github.com/VenusProtocol/solidity-utilities/commit/1c452e2a14833716640458716bec6b1c6bf67ecf)) +* Scope 1. Misc. TimeManagerV8 ([0a957e5](https://github.com/VenusProtocol/solidity-utilities/commit/0a957e59733ca79b3cf547974a39a3b435c87b0a)) + ## [1.3.0](https://github.com/VenusProtocol/solidity-utilities/compare/v1.2.0...v1.3.0) (2024-01-09) diff --git a/package.json b/package.json index 2e0f54a..f5cde5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/solidity-utilities", - "version": "1.3.0", + "version": "1.3.1-dev.1", "description": "Solidity code used by other Venus projects", "files": [ "artifacts", From 88b12ce1f501b650eeacb8664d0fc744f1c3b61b Mon Sep 17 00:00:00 2001 From: Kirill Kuvshinov Date: Wed, 20 Mar 2024 16:31:38 +0300 Subject: [PATCH 4/5] feat!: migrate to 0.8.25 --- contracts/ExponentialNoError.sol | 2 +- contracts/MaxLoopsLimitHelper.sol | 2 +- contracts/TimeManagerV8.sol | 2 +- contracts/constants.sol | 2 +- contracts/test/HarnessMaxLoopsLimitHelper.sol | 2 +- contracts/validators.sol | 2 +- hardhat.config.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contracts/ExponentialNoError.sol b/contracts/ExponentialNoError.sol index 82f5a7a..7126c65 100644 --- a/contracts/ExponentialNoError.sol +++ b/contracts/ExponentialNoError.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -pragma solidity 0.8.13; +pragma solidity 0.8.25; import { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from "./constants.sol"; diff --git a/contracts/MaxLoopsLimitHelper.sol b/contracts/MaxLoopsLimitHelper.sol index 7c5e142..4ed1ce0 100644 --- a/contracts/MaxLoopsLimitHelper.sol +++ b/contracts/MaxLoopsLimitHelper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -pragma solidity 0.8.13; +pragma solidity 0.8.25; /** * @title MaxLoopsLimitHelper diff --git a/contracts/TimeManagerV8.sol b/contracts/TimeManagerV8.sol index 7c22190..cdd2ad4 100644 --- a/contracts/TimeManagerV8.sol +++ b/contracts/TimeManagerV8.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -pragma solidity 0.8.13; +pragma solidity 0.8.25; import { SECONDS_PER_YEAR } from "./constants.sol"; diff --git a/contracts/constants.sol b/contracts/constants.sol index 5730cf8..49817fc 100644 --- a/contracts/constants.sol +++ b/contracts/constants.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -pragma solidity 0.8.13; +pragma solidity ^0.8.25; /// @dev Base unit for computations, usually used in scaling (multiplications, divisions) uint256 constant EXP_SCALE = 1e18; diff --git a/contracts/test/HarnessMaxLoopsLimitHelper.sol b/contracts/test/HarnessMaxLoopsLimitHelper.sol index 996754b..a3c017c 100644 --- a/contracts/test/HarnessMaxLoopsLimitHelper.sol +++ b/contracts/test/HarnessMaxLoopsLimitHelper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -pragma solidity 0.8.13; +pragma solidity 0.8.25; import { MaxLoopsLimitHelper } from "../MaxLoopsLimitHelper.sol"; diff --git a/contracts/validators.sol b/contracts/validators.sol index 6456495..c7a3772 100644 --- a/contracts/validators.sol +++ b/contracts/validators.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -pragma solidity 0.8.13; +pragma solidity 0.8.25; /// @notice Thrown if the supplied address is a zero address where it is not allowed error ZeroAddressNotAllowed(); diff --git a/hardhat.config.ts b/hardhat.config.ts index 4b06192..44418fd 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -32,7 +32,7 @@ const config: HardhatUserConfig = { solidity: { compilers: [ { - version: "0.8.13", + version: "0.8.25", settings: { optimizer: { enabled: true, From 543eee29065cf466f8e822eaba83f88cee4c0d00 Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Wed, 10 Apr 2024 09:32:58 +0000 Subject: [PATCH 5/5] chore(release): 2.0.0-dev.1 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [2.0.0-dev.1](https://github.com/VenusProtocol/solidity-utilities/compare/v1.3.1-dev.1...v2.0.0-dev.1) (2024-04-10) ### ⚠ BREAKING CHANGES * migrate to 0.8.25 ### Features * migrate to 0.8.25 ([88b12ce](https://github.com/VenusProtocol/solidity-utilities/commit/88b12ce1f501b650eeacb8664d0fc744f1c3b61b)) --- CHANGELOG.md | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4bcfc2..c1624ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## [2.0.0-dev.1](https://github.com/VenusProtocol/solidity-utilities/compare/v1.3.1-dev.1...v2.0.0-dev.1) (2024-04-10) + + +### ⚠ BREAKING CHANGES + +* migrate to 0.8.25 + +### Features + +* migrate to 0.8.25 ([88b12ce](https://github.com/VenusProtocol/solidity-utilities/commit/88b12ce1f501b650eeacb8664d0fc744f1c3b61b)) + ## [1.3.1-dev.1](https://github.com/VenusProtocol/solidity-utilities/compare/v1.3.0...v1.3.1-dev.1) (2024-03-04) diff --git a/package.json b/package.json index f5cde5f..6d9d7e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/solidity-utilities", - "version": "1.3.1-dev.1", + "version": "2.0.0-dev.1", "description": "Solidity code used by other Venus projects", "files": [ "artifacts",