Skip to content

Commit

Permalink
Merge pull request #20 from VenusProtocol/develop
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
chechu authored Apr 10, 2024
2 parents 38bfcb9 + 543eee2 commit 297c500
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 11 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## [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)


### 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)


Expand Down
2 changes: 1 addition & 1 deletion contracts/ExponentialNoError.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion contracts/MaxLoopsLimitHelper.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.13;
pragma solidity 0.8.25;

/**
* @title MaxLoopsLimitHelper
Expand Down
11 changes: 7 additions & 4 deletions contracts/TimeManagerV8.sol
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.13;
pragma solidity 0.8.25;

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;

Check warning on line 9 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

Check warning on line 9 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

/// @notice Acknowledges if a contract is time based or not
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
bool public immutable isTimeBased;

Check warning on line 13 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

Check warning on line 13 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

/// @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;

Check warning on line 17 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

Check warning on line 17 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

/**
* @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;

/// @notice Thrown when blocks per year is invalid
error InvalidBlocksPerYear();

Expand Down
2 changes: 1 addition & 1 deletion contracts/constants.sol
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/HarnessMaxLoopsLimitHelper.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion contracts/validators.sol
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.13",
version: "0.8.25",
settings: {
optimizer: {
enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@venusprotocol/solidity-utilities",
"version": "1.3.0",
"version": "2.0.0-dev.1",
"description": "Solidity code used by other Venus projects",
"files": [
"artifacts",
Expand Down

0 comments on commit 297c500

Please sign in to comment.