diff --git a/.solhint.json b/.solhint.json
index 50a2b89..8db80b0 100644
--- a/.solhint.json
+++ b/.solhint.json
@@ -1,7 +1,7 @@
{
"extends": "solhint:all",
"rules": {
- "compiler-version": ["error","^0.6.10"],
+ "compiler-version": ["error","^0.8.8"],
"state-visibility": "error",
"no-empty-blocks": "error",
"check-send-result": "error",
diff --git a/contracts/IBountyV2.sol b/contracts/IBountyV2.sol
index 8770119..a9ec57f 100644
--- a/contracts/IBountyV2.sol
+++ b/contracts/IBountyV2.sol
@@ -19,7 +19,7 @@
along with SKALE Manager Interfaces. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IBountyV2 {
@@ -44,4 +44,4 @@ interface IBountyV2 {
function estimateBounty(uint nodeIndex) external view returns (uint);
function getNextRewardTimestamp(uint nodeIndex) external view returns (uint);
function getEffectiveDelegatedSum() external view returns (uint[] memory);
-}
\ No newline at end of file
+}
diff --git a/contracts/IConstantsHolder.sol b/contracts/IConstantsHolder.sol
index e8ea696..b44502e 100644
--- a/contracts/IConstantsHolder.sol
+++ b/contracts/IConstantsHolder.sol
@@ -19,7 +19,7 @@
along with SKALE Manager Interfaces. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IConstantsHolder {
diff --git a/contracts/IContractManager.sol b/contracts/IContractManager.sol
index c584ef3..955550f 100644
--- a/contracts/IContractManager.sol
+++ b/contracts/IContractManager.sol
@@ -19,7 +19,7 @@
along with SKALE Manager Interfaces. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IContractManager {
/**
diff --git a/contracts/IDecryption.sol b/contracts/IDecryption.sol
index 9e9046c..425bfab 100644
--- a/contracts/IDecryption.sol
+++ b/contracts/IDecryption.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IDecryption {
function encrypt(uint256 secretNumber, bytes32 key) external pure returns (bytes32);
diff --git a/contracts/IKeyStorage.sol b/contracts/IKeyStorage.sol
index 8700f68..d9cc89b 100644
--- a/contracts/IKeyStorage.sol
+++ b/contracts/IKeyStorage.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
import "./ISkaleDKG.sol";
@@ -29,7 +29,7 @@ interface IKeyStorage {
bytes32[2] publicKey;
bytes32 share;
}
-
+
function deleteKey(bytes32 schainHash) external;
function initPublicKeyInProgress(bytes32 schainHash) external;
function adding(bytes32 schainHash, ISkaleDKG.G2Point memory value) external;
diff --git a/contracts/IMintableToken.sol b/contracts/IMintableToken.sol
index e61a684..48754c2 100644
--- a/contracts/IMintableToken.sol
+++ b/contracts/IMintableToken.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IMintableToken {
function mint(
@@ -30,4 +30,4 @@ interface IMintableToken {
)
external
returns (bool);
-}
\ No newline at end of file
+}
diff --git a/contracts/INodeRotation.sol b/contracts/INodeRotation.sol
index 08b52ef..87bd3dc 100644
--- a/contracts/INodeRotation.sol
+++ b/contracts/INodeRotation.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface INodeRotation {
/**
diff --git a/contracts/INodes.sol b/contracts/INodes.sol
index e7f4f88..1607c19 100644
--- a/contracts/INodes.sol
+++ b/contracts/INodes.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
import "./utils/IRandom.sol";
diff --git a/contracts/IPaymasterController.sol b/contracts/IPaymasterController.sol
index d3d0ce0..7e8df05 100644
--- a/contracts/IPaymasterController.sol
+++ b/contracts/IPaymasterController.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IPaymasterController {
function addSchain(string calldata name) external;
diff --git a/contracts/IPermissions.sol b/contracts/IPermissions.sol
index c8e35c1..761a20a 100644
--- a/contracts/IPermissions.sol
+++ b/contracts/IPermissions.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IPermissions {
function initialize(address contractManagerAddress) external;
diff --git a/contracts/IPricing.sol b/contracts/IPricing.sol
index 8d92fc7..6f7eebc 100644
--- a/contracts/IPricing.sol
+++ b/contracts/IPricing.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IPricing {
function initNodes() external;
diff --git a/contracts/ISchains.sol b/contracts/ISchains.sol
index 6fd8efb..f85d7b0 100644
--- a/contracts/ISchains.sol
+++ b/contracts/ISchains.sol
@@ -19,7 +19,7 @@
along with SKALE Manager Interfaces. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface ISchains {
@@ -27,7 +27,7 @@ interface ISchains {
string name;
bytes value;
}
-
+
/**
* @dev Emitted when an schain is created.
*/
diff --git a/contracts/ISchainsInternal.sol b/contracts/ISchainsInternal.sol
index c2f6ce9..d4554b7 100644
--- a/contracts/ISchainsInternal.sol
+++ b/contracts/ISchainsInternal.sol
@@ -19,7 +19,7 @@
along with SKALE Manager Interfaces. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
import "./INodes.sol";
diff --git a/contracts/ISkaleDKG.sol b/contracts/ISkaleDKG.sol
index 258468d..a623d9f 100644
--- a/contracts/ISkaleDKG.sol
+++ b/contracts/ISkaleDKG.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface ISkaleDKG {
diff --git a/contracts/ISkaleManager.sol b/contracts/ISkaleManager.sol
index e097139..904b416 100644
--- a/contracts/ISkaleManager.sol
+++ b/contracts/ISkaleManager.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface ISkaleManager {
/**
@@ -38,7 +38,7 @@ interface ISkaleManager {
uint bounty,
uint previousBlockEvent
);
-
+
function createNode(
uint16 port,
uint16 nonce,
diff --git a/contracts/ISkaleVerifier.sol b/contracts/ISkaleVerifier.sol
index 9aa58a5..459d099 100644
--- a/contracts/ISkaleVerifier.sol
+++ b/contracts/ISkaleVerifier.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
import "./ISkaleDKG.sol";
diff --git a/contracts/ISlashingTable.sol b/contracts/ISlashingTable.sol
index 38c6833..32c3550 100644
--- a/contracts/ISlashingTable.sol
+++ b/contracts/ISlashingTable.sol
@@ -19,14 +19,14 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface ISlashingTable {
/**
* @dev Emitted when penalty was added
*/
event PenaltyAdded(uint indexed offenseHash, string offense, uint penalty);
-
+
function setPenalty(string calldata offense, uint penalty) external;
function getPenalty(string calldata offense) external view returns (uint);
}
diff --git a/contracts/ISyncManager.sol b/contracts/ISyncManager.sol
index 4c02e4d..d36c3c1 100644
--- a/contracts/ISyncManager.sol
+++ b/contracts/ISyncManager.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface ISyncManager {
struct IPRange {
diff --git a/contracts/IWallets.sol b/contracts/IWallets.sol
index f981716..0ca2f22 100644
--- a/contracts/IWallets.sol
+++ b/contracts/IWallets.sol
@@ -19,7 +19,7 @@
along with SKALE Manager Interfaces. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IWallets {
receive() external payable;
diff --git a/contracts/delegation/IDelegatableToken.sol b/contracts/delegation/IDelegatableToken.sol
index dd353eb..acd28a9 100644
--- a/contracts/delegation/IDelegatableToken.sol
+++ b/contracts/delegation/IDelegatableToken.sol
@@ -19,25 +19,25 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
/**
* @dev Interface of the SkaleToken contract.
*/
interface IDelegatableToken {
-
+
/**
* @dev Returns and updates the amount of locked tokens of a given account `wallet`.
*/
function getAndUpdateLockedAmount(address wallet) external returns (uint);
-
+
/**
* @dev Returns and updates the amount of delegated tokens of a given account `wallet`.
*/
function getAndUpdateDelegatedAmount(address wallet) external returns (uint);
-
+
/**
* @dev Returns and updates the amount of slashed tokens of a given account `wallet`.
*/
function getAndUpdateSlashedAmount(address wallet) external returns (uint);
-}
\ No newline at end of file
+}
diff --git a/contracts/delegation/IDelegationController.sol b/contracts/delegation/IDelegationController.sol
index 0b5c5fe..b7bfcfb 100644
--- a/contracts/delegation/IDelegationController.sol
+++ b/contracts/delegation/IDelegationController.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IDelegationController {
enum State {
@@ -86,7 +86,7 @@ interface IDelegationController {
event UndelegationRequested(
uint delegationId
);
-
+
function getAndUpdateDelegatedToValidatorNow(uint validatorId) external returns (uint);
function getAndUpdateDelegatedAmount(address holder) external returns (uint);
function getAndUpdateEffectiveDelegatedByHolderToValidator(address holder, uint validatorId, uint month)
diff --git a/contracts/delegation/IDelegationPeriodManager.sol b/contracts/delegation/IDelegationPeriodManager.sol
index 3f6f4e1..eb090d1 100644
--- a/contracts/delegation/IDelegationPeriodManager.sol
+++ b/contracts/delegation/IDelegationPeriodManager.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IDelegationPeriodManager {
/**
@@ -29,7 +29,7 @@ interface IDelegationPeriodManager {
uint length,
uint stakeMultiplier
);
-
+
function setDelegationPeriod(uint monthsCount, uint stakeMultiplier) external;
function stakeMultipliers(uint monthsCount) external view returns (uint);
function isDelegationPeriodAllowed(uint monthsCount) external view returns (bool);
diff --git a/contracts/delegation/IDistributor.sol b/contracts/delegation/IDistributor.sol
index 9988d11..d08de1f 100644
--- a/contracts/delegation/IDistributor.sol
+++ b/contracts/delegation/IDistributor.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IDistributor {
/**
@@ -48,7 +48,7 @@ interface IDistributor {
uint validatorId,
uint amount
);
-
+
function getAndUpdateEarnedBountyAmount(uint validatorId) external returns (uint earned, uint endMonth);
function withdrawBounty(uint validatorId, address to) external;
function withdrawFee(address to) external;
diff --git a/contracts/delegation/ILocker.sol b/contracts/delegation/ILocker.sol
index 92812ea..8ba504c 100644
--- a/contracts/delegation/ILocker.sol
+++ b/contracts/delegation/ILocker.sol
@@ -19,14 +19,14 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
/**
* @dev Interface of the Locker functions.
*/
interface ILocker {
/**
- * @dev Returns and updates the total amount of locked tokens of a given
+ * @dev Returns and updates the total amount of locked tokens of a given
* `holder`.
*/
function getAndUpdateLockedAmount(address wallet) external returns (uint);
diff --git a/contracts/delegation/IPunisher.sol b/contracts/delegation/IPunisher.sol
index afe38c1..84311a9 100644
--- a/contracts/delegation/IPunisher.sol
+++ b/contracts/delegation/IPunisher.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IPunisher {
/**
@@ -37,7 +37,7 @@ interface IPunisher {
address wallet,
uint amount
);
-
+
function slash(uint validatorId, uint amount) external;
function forgive(address holder, uint amount) external;
function handleSlash(address holder, uint amount) external;
diff --git a/contracts/delegation/ITimeHelpers.sol b/contracts/delegation/ITimeHelpers.sol
index 62d594b..7d05548 100644
--- a/contracts/delegation/ITimeHelpers.sol
+++ b/contracts/delegation/ITimeHelpers.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface ITimeHelpers {
function calculateProofOfUseLockEndTime(uint month, uint lockUpPeriodDays) external view returns (uint timestamp);
diff --git a/contracts/delegation/ITokenState.sol b/contracts/delegation/ITokenState.sol
index 3731ecc..0fa620a 100644
--- a/contracts/delegation/ITokenState.sol
+++ b/contracts/delegation/ITokenState.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface ITokenState {
/**
@@ -35,7 +35,7 @@ interface ITokenState {
event LockerWasRemoved(
string locker
);
-
+
function removeLocker(string calldata locker) external;
function addLocker(string memory locker) external;
}
diff --git a/contracts/delegation/IValidatorService.sol b/contracts/delegation/IValidatorService.sol
index 6abf3e0..3e2258d 100644
--- a/contracts/delegation/IValidatorService.sol
+++ b/contracts/delegation/IValidatorService.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IValidatorService {
struct Validator {
@@ -32,7 +32,7 @@ interface IValidatorService {
uint minimumDelegationAmount;
bool acceptNewRequests;
}
-
+
/**
* @dev Emitted when a validator registers.
*/
@@ -107,7 +107,7 @@ interface IValidatorService {
* @dev Emitted when validator start or stop accepting new delegation requests.
*/
event AcceptingNewRequests(uint indexed validatorId, bool status);
-
+
function registerValidator(
string calldata name,
string calldata description,
diff --git a/contracts/thirdparty/IECDH.sol b/contracts/thirdparty/IECDH.sol
index 6630524..0a6270f 100644
--- a/contracts/thirdparty/IECDH.sol
+++ b/contracts/thirdparty/IECDH.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IECDH {
function publicKey(uint256 privKey) external pure returns (uint256 qx, uint256 qy);
diff --git a/contracts/thirdparty/openzeppelin/IAccessControlUpgradeableLegacy.sol b/contracts/thirdparty/openzeppelin/IAccessControlUpgradeableLegacy.sol
index b4ee669..f8c3703 100644
--- a/contracts/thirdparty/openzeppelin/IAccessControlUpgradeableLegacy.sol
+++ b/contracts/thirdparty/openzeppelin/IAccessControlUpgradeableLegacy.sol
@@ -19,7 +19,7 @@
along with SKALE Manager. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IAccessControlUpgradeableLegacy {
/**
@@ -38,7 +38,7 @@ interface IAccessControlUpgradeableLegacy {
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
-
+
function grantRole(bytes32 role, address account) external;
function revokeRole(bytes32 role, address account) external;
function renounceRole(bytes32 role, address account) external;
diff --git a/contracts/utils/IRandom.sol b/contracts/utils/IRandom.sol
index 205c69f..d5396ba 100644
--- a/contracts/utils/IRandom.sol
+++ b/contracts/utils/IRandom.sol
@@ -19,11 +19,11 @@
along with SKALE Manager Interfaces. If not, see .
*/
-pragma solidity >=0.6.10 <0.9.0;
+pragma solidity >=0.8.8 <0.9.0;
interface IRandom {
struct RandomGenerator {
uint seed;
}
-}
\ No newline at end of file
+}
diff --git a/hardhat.config.ts b/hardhat.config.ts
index 3c9778a..5e62f92 100644
--- a/hardhat.config.ts
+++ b/hardhat.config.ts
@@ -1,7 +1,7 @@
import { HardhatUserConfig } from "hardhat/config";
const config: HardhatUserConfig = {
- solidity: "0.8.0",
+ solidity: "0.8.27",
};
export default config;