From 54099f41bb7db67b6ad5be2b2a9b565d26475a26 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Mon, 3 Jun 2024 17:54:42 +0300 Subject: [PATCH 01/14] Add NODE_DEPOSIT --- contracts/IConstantsHolder.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contracts/IConstantsHolder.sol b/contracts/IConstantsHolder.sol index b719848..750e9b7 100644 --- a/contracts/IConstantsHolder.sol +++ b/contracts/IConstantsHolder.sol @@ -46,6 +46,9 @@ interface IConstantsHolder { function setComplaintTimeLimit(uint timeLimit) external; function setMinNodeBalance(uint newMinNodeBalance) external; function reinitialize() external; + // Corresponds to the public field + // solhint-disable-next-line func-name-mixedcase + function NODE_DEPOSIT() external view returns (uint256); function msr() external view returns (uint); function launchTimestamp() external view returns (uint); function rotationDelay() external view returns (uint); From 468ccc03c7cfe9589f190bb38bd5b2244d24887f Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Mon, 3 Jun 2024 17:59:11 +0300 Subject: [PATCH 02/14] Add SMALL_DIVISOR --- contracts/IConstantsHolder.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contracts/IConstantsHolder.sol b/contracts/IConstantsHolder.sol index 750e9b7..5f2fcfc 100644 --- a/contracts/IConstantsHolder.sol +++ b/contracts/IConstantsHolder.sol @@ -49,6 +49,9 @@ interface IConstantsHolder { // Corresponds to the public field // solhint-disable-next-line func-name-mixedcase function NODE_DEPOSIT() external view returns (uint256); + // Corresponds to the public field + // solhint-disable-next-line func-name-mixedcase + function SMALL_DIVISOR() external view returns (uint8); function msr() external view returns (uint); function launchTimestamp() external view returns (uint); function rotationDelay() external view returns (uint); From 54a5febfd2a961d207f621559ca29e92a23fe602 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Mon, 3 Jun 2024 18:03:15 +0300 Subject: [PATCH 03/14] Add SECONDS_TO_YEAR --- contracts/IConstantsHolder.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/IConstantsHolder.sol b/contracts/IConstantsHolder.sol index 5f2fcfc..f320046 100644 --- a/contracts/IConstantsHolder.sol +++ b/contracts/IConstantsHolder.sol @@ -47,11 +47,11 @@ interface IConstantsHolder { function setMinNodeBalance(uint newMinNodeBalance) external; function reinitialize() external; // Corresponds to the public field - // solhint-disable-next-line func-name-mixedcase + // solhint-disable func-name-mixedcase function NODE_DEPOSIT() external view returns (uint256); - // Corresponds to the public field - // solhint-disable-next-line func-name-mixedcase + function SECONDS_TO_YEAR() external view returns (uint32); function SMALL_DIVISOR() external view returns (uint8); + // solhint-enable func-name-mixedcase function msr() external view returns (uint); function launchTimestamp() external view returns (uint); function rotationDelay() external view returns (uint); From bde875ac8c2396c65884eee02f783a9bdc6cf0b3 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Tue, 4 Jun 2024 15:38:39 +0300 Subject: [PATCH 04/14] Add IPaymasterController --- contracts/IPaymasterController.sol | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 contracts/IPaymasterController.sol diff --git a/contracts/IPaymasterController.sol b/contracts/IPaymasterController.sol new file mode 100644 index 0000000..ee37ee7 --- /dev/null +++ b/contracts/IPaymasterController.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: AGPL-3.0-only + +/* + IPaymasterController.sol - SKALE Manager + Copyright (C) 2018-Present SKALE Labs + @author Artem Payvin + + SKALE Manager is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + SKALE Manager is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with SKALE Manager. If not, see . +*/ + +pragma solidity >=0.6.10 <0.9.0; + +interface IPaymasterController { + function initialize(address contractManagerAddress) external; + function addSchain(string calldata name) external; + function setImaAddress(address imaAddress) external; + function setMarionetteAddress(address payable marionetteAddress) external; + function setPaymasterAddress(address paymasterAddress) external; + function setPaymasterChainHash(bytes32 chainHash) external; +} From 3fc73ce5c1b2c8bb08faf01109ffaf8368ea1126 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Tue, 4 Jun 2024 16:16:49 +0300 Subject: [PATCH 05/14] Remove initializer --- contracts/IPaymasterController.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/contracts/IPaymasterController.sol b/contracts/IPaymasterController.sol index ee37ee7..317fe1b 100644 --- a/contracts/IPaymasterController.sol +++ b/contracts/IPaymasterController.sol @@ -22,7 +22,6 @@ pragma solidity >=0.6.10 <0.9.0; interface IPaymasterController { - function initialize(address contractManagerAddress) external; function addSchain(string calldata name) external; function setImaAddress(address imaAddress) external; function setMarionetteAddress(address payable marionetteAddress) external; From 2a4e31af3d32aba494d05bec907c8833f272f571 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Thu, 6 Jun 2024 17:55:06 +0300 Subject: [PATCH 06/14] Add removeSchain --- contracts/IPaymasterController.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/IPaymasterController.sol b/contracts/IPaymasterController.sol index 317fe1b..7eaa0a3 100644 --- a/contracts/IPaymasterController.sol +++ b/contracts/IPaymasterController.sol @@ -23,6 +23,7 @@ pragma solidity >=0.6.10 <0.9.0; interface IPaymasterController { function addSchain(string calldata name) external; + function removeSchain(bytes32 schainHash) external; function setImaAddress(address imaAddress) external; function setMarionetteAddress(address payable marionetteAddress) external; function setPaymasterAddress(address paymasterAddress) external; From 01f800fa7db2b83e61c4f5c2523e4894aef11b13 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Tue, 11 Jun 2024 16:12:51 +0300 Subject: [PATCH 07/14] Add addValidator function --- contracts/IPaymasterController.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/IPaymasterController.sol b/contracts/IPaymasterController.sol index 7eaa0a3..e3a20d6 100644 --- a/contracts/IPaymasterController.sol +++ b/contracts/IPaymasterController.sol @@ -23,6 +23,7 @@ pragma solidity >=0.6.10 <0.9.0; interface IPaymasterController { function addSchain(string calldata name) external; + function addValidator(uint256 validatorId, address validatorAddress) external; function removeSchain(bytes32 schainHash) external; function setImaAddress(address imaAddress) external; function setMarionetteAddress(address payable marionetteAddress) external; From dab51a42e58142bbd15726d3986f60d24cfb1775 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Wed, 12 Jun 2024 17:49:08 +0300 Subject: [PATCH 08/14] Add setValidatorAddress function --- contracts/IPaymasterController.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/IPaymasterController.sol b/contracts/IPaymasterController.sol index e3a20d6..13c09eb 100644 --- a/contracts/IPaymasterController.sol +++ b/contracts/IPaymasterController.sol @@ -29,4 +29,5 @@ interface IPaymasterController { function setMarionetteAddress(address payable marionetteAddress) external; function setPaymasterAddress(address paymasterAddress) external; function setPaymasterChainHash(bytes32 chainHash) external; + function setValidatorAddress(uint256 validatorId, address validatorAddress) external; } From 9253ba590a2335d4414ae5ae5e08e3d0f9b3007e Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Wed, 12 Jun 2024 18:17:24 +0300 Subject: [PATCH 09/14] Add setNodesAmount function --- contracts/IPaymasterController.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/IPaymasterController.sol b/contracts/IPaymasterController.sol index 13c09eb..d3d0ce0 100644 --- a/contracts/IPaymasterController.sol +++ b/contracts/IPaymasterController.sol @@ -27,6 +27,7 @@ interface IPaymasterController { function removeSchain(bytes32 schainHash) external; function setImaAddress(address imaAddress) external; function setMarionetteAddress(address payable marionetteAddress) external; + function setNodesAmount(uint256 validatorId, uint256 nodesAmount) external; function setPaymasterAddress(address paymasterAddress) external; function setPaymasterChainHash(bytes32 chainHash) external; function setValidatorAddress(uint256 validatorId, address validatorAddress) external; From e45fa436d736bb84e00c7baf94eecc9aea0cfe6f Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Thu, 13 Jun 2024 18:24:29 +0300 Subject: [PATCH 10/14] Add TOTAL_SPACE_ON_NODE --- contracts/IConstantsHolder.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/IConstantsHolder.sol b/contracts/IConstantsHolder.sol index f320046..ba5d13b 100644 --- a/contracts/IConstantsHolder.sol +++ b/contracts/IConstantsHolder.sol @@ -51,6 +51,7 @@ interface IConstantsHolder { function NODE_DEPOSIT() external view returns (uint256); function SECONDS_TO_YEAR() external view returns (uint32); function SMALL_DIVISOR() external view returns (uint8); + function TOTAL_SPACE_ON_NODE() external view returns (uint8); // solhint-enable func-name-mixedcase function msr() external view returns (uint); function launchTimestamp() external view returns (uint); From 66136444610e308bbcfa03bf4d7bf9d7eeb65125 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Mon, 5 Aug 2024 17:02:44 +0300 Subject: [PATCH 11/14] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33fd6f5..8bf52a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@skalenetwork/skale-manager-interfaces", - "version": "3.1.0", + "version": "3.2.0", "description": "Definitions of interfaces needed to integrate with skale-manager smart contracts", "main": "index.js", "repository": "git@github.com:skalenetwork/skale-manager-interfaces.git", From b8d1f996da090c63146b6b927bc61023f9415f1d Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 9 Aug 2024 17:19:03 +0300 Subject: [PATCH 12/14] Update slither --- scripts/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 279067a..6bdff3f 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -1 +1 @@ -slither-analyzer==0.8.0 +slither-analyzer==0.10.3 From 5bf0a7ea6317209ef483e226185a78c60a0571c4 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 9 Aug 2024 17:23:55 +0300 Subject: [PATCH 13/14] Git silent slither --- contracts/IConstantsHolder.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/IConstantsHolder.sol b/contracts/IConstantsHolder.sol index ba5d13b..842cf57 100644 --- a/contracts/IConstantsHolder.sol +++ b/contracts/IConstantsHolder.sol @@ -48,11 +48,13 @@ interface IConstantsHolder { function reinitialize() external; // Corresponds to the public field // solhint-disable func-name-mixedcase + // slither-disable-start naming-convention function NODE_DEPOSIT() external view returns (uint256); function SECONDS_TO_YEAR() external view returns (uint32); function SMALL_DIVISOR() external view returns (uint8); function TOTAL_SPACE_ON_NODE() external view returns (uint8); // solhint-enable func-name-mixedcase + // slither-disable-end naming-convention function msr() external view returns (uint); function launchTimestamp() external view returns (uint); function rotationDelay() external view returns (uint); From b6ba38cd4a978d59f4281d9fcb980040329f406e Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Wed, 28 Aug 2024 12:16:24 +0300 Subject: [PATCH 14/14] Add BOUNTY_LOCKUP_MONTHS --- contracts/IConstantsHolder.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/IConstantsHolder.sol b/contracts/IConstantsHolder.sol index 842cf57..e8ea696 100644 --- a/contracts/IConstantsHolder.sol +++ b/contracts/IConstantsHolder.sol @@ -49,6 +49,7 @@ interface IConstantsHolder { // Corresponds to the public field // solhint-disable func-name-mixedcase // slither-disable-start naming-convention + function BOUNTY_LOCKUP_MONTHS() external view returns (uint256); function NODE_DEPOSIT() external view returns (uint256); function SECONDS_TO_YEAR() external view returns (uint32); function SMALL_DIVISOR() external view returns (uint8);