Skip to content

Commit

Permalink
[S-6] Unnecessary Upgradeable Feature in ConstantsManager
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-CZ committed Dec 15, 2024
1 parent ec80b7f commit 25ad4c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 3 additions & 5 deletions contracts/sfc/ConstantsManager.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;

import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Decimal} from "../common/Decimal.sol";

/**
* @custom:security-contact [email protected]
*/
contract ConstantsManager is OwnableUpgradeable {
contract ConstantsManager is Ownable {
// Minimum amount of stake for a validator, i.e., 500000 FTM
uint256 public minSelfStake;
// Maximum ratio of delegations a validator can have, say, 15 times of self-stake
Expand Down Expand Up @@ -63,9 +63,7 @@ contract ConstantsManager is OwnableUpgradeable {
*/
error ValueTooLarge();

constructor(address owner) initializer {
__Ownable_init(owner);
}
constructor(address owner) Ownable(owner) {}

function updateMinSelfStake(uint256 v) external virtual onlyOwner {
if (v < 100000 * 1e18) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"typescript-eslint": "^8.8.0"
},
"dependencies": {
"@openzeppelin/contracts": "^5.1.0",
"@openzeppelin/contracts-upgradeable": "^5.1.0",
"dotenv": "^16.0.3"
}
Expand Down

0 comments on commit 25ad4c0

Please sign in to comment.