From 1cadb4342cf5d99c95467b1b259da57f552759c0 Mon Sep 17 00:00:00 2001 From: Marco Tabasco Date: Tue, 23 Apr 2024 13:43:42 +0200 Subject: [PATCH] add view functions, refactors --- contracts/SSVNetwork.sol | 12 +- contracts/SSVNetworkViews.sol | 7 ++ .../interfaces/ISSVOperatorsWhitelist.sol | 4 + contracts/interfaces/ISSVViews.sol | 22 +++- contracts/libraries/OperatorLib.sol | 72 ++++++------ contracts/modules/SSVOperatorsWhitelist.sol | 21 +++- contracts/modules/SSVViews.sol | 64 +++++++++- package-lock.json | 110 ++++++------------ package.json | 2 +- 9 files changed, 195 insertions(+), 119 deletions(-) diff --git a/contracts/SSVNetwork.sol b/contracts/SSVNetwork.sol index d6675644..ad9da5a8 100644 --- a/contracts/SSVNetwork.sol +++ b/contracts/SSVNetwork.sol @@ -138,20 +138,24 @@ contract SSVNetwork is _delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS_WHITELIST]); } - function setOperatorsWhitelistingContract( + function removeOperatorMultipleWhitelists( uint64[] calldata operatorIds, - ISSVWhitelistingContract whitelistingContract + address[] calldata whitelistAddresses ) external override { _delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS_WHITELIST]); } - function removeOperatorMultipleWhitelists( + function setOperatorsWhitelistingContract( uint64[] calldata operatorIds, - address[] calldata whitelistAddresses + ISSVWhitelistingContract whitelistingContract ) external override { _delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS_WHITELIST]); } + function removeOperatorsWhitelistingContract(uint64[] calldata operatorIds) external override { + _delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS_WHITELIST]); + } + function declareOperatorFee(uint64 operatorId, uint256 fee) external override { _delegate(SSVStorage.load().ssvContracts[SSVModules.SSV_OPERATORS]); } diff --git a/contracts/SSVNetworkViews.sol b/contracts/SSVNetworkViews.sol index 5da979a6..eaddef14 100644 --- a/contracts/SSVNetworkViews.sol +++ b/contracts/SSVNetworkViews.sol @@ -61,6 +61,13 @@ contract SSVNetworkViews is UUPSUpgradeable, Ownable2StepUpgradeable, ISSVViews return ssvNetwork.getOperatorById(operatorId); } + function getWhitelistedOperators( + uint64[] calldata operatorIds, + address whitelistedAddress + ) external view override returns (uint64[] memory whitelistedOperatorIds) { + return ssvNetwork.getWhitelistedOperators(operatorIds, whitelistedAddress); + } + /***********************************/ /* Cluster External View Functions */ /***********************************/ diff --git a/contracts/interfaces/ISSVOperatorsWhitelist.sol b/contracts/interfaces/ISSVOperatorsWhitelist.sol index 282bae48..edda7bc5 100644 --- a/contracts/interfaces/ISSVOperatorsWhitelist.sol +++ b/contracts/interfaces/ISSVOperatorsWhitelist.sol @@ -31,6 +31,10 @@ interface ISSVOperatorsWhitelist is ISSVNetworkCore { /// @param whitelistingContract The address of a whitelisting contract function setOperatorsWhitelistingContract(uint64[] calldata operatorIds, ISSVWhitelistingContract whitelistingContract) external; + /// @notice Removes the whitelisting contract set for a list of operators + /// @param operatorIds The operator IDs to remove the whitelisting contract for + function removeOperatorsWhitelistingContract(uint64[] calldata operatorIds) external; + /** * @dev Emitted when the whitelist of an operator is updated. * @param operatorId operator's ID. diff --git a/contracts/interfaces/ISSVViews.sol b/contracts/interfaces/ISSVViews.sol index b635013c..d7944ba8 100644 --- a/contracts/interfaces/ISSVViews.sol +++ b/contracts/interfaces/ISSVViews.sol @@ -30,15 +30,31 @@ interface ISSVViews is ISSVNetworkCore { /// @return owner The owner of the operator /// @return fee The fee associated with the operator (SSV) /// @return validatorCount The count of validators associated with the operator - /// @return whitelisted The whitelisted address of the operator, if any - /// @return isPrivate A boolean indicating if the operator is private + /// @return whitelistedContract The whitelisted contract address of the operator, if any + /// @return useWhitelistedContract A boolean indicating if the operator uses a whitelisted contract /// @return active A boolean indicating if the operator is active function getOperatorById( uint64 operatorId ) external view - returns (address owner, uint256 fee, uint32 validatorCount, address whitelisted, bool isPrivate, bool active); + returns ( + address owner, + uint256 fee, + uint32 validatorCount, + address whitelistedContract, + bool useWhitelistedContract, + bool active + ); + + /// @notice Gets the list of operators that have the given whitelisted address (EOA or generic contract) + /// @param operatorIds The list of operator IDs to check + /// @param whitelistedAddress The address whitelisted for the operators + /// @return whitelistedOperatorIds The list of operator IDs that have the given whitelisted address + function getWhitelistedOperators( + uint64[] calldata operatorIds, + address whitelistedAddress + ) external view returns (uint64[] memory whitelistedOperatorIds); /// @notice Checks if the cluster can be liquidated /// @param owner The owner address of the cluster diff --git a/contracts/libraries/OperatorLib.sol b/contracts/libraries/OperatorLib.sol index 17e4c3bd..606b3652 100644 --- a/contracts/libraries/OperatorLib.sol +++ b/contracts/libraries/OperatorLib.sol @@ -112,11 +112,6 @@ library OperatorLib { } } - function getBitmapIndexes(uint64 operatorId) internal pure returns (uint256 blockIndex, uint256 bitPosition) { - blockIndex = operatorId >> 8; // Equivalent to operatorId / 256 - bitPosition = operatorId & 0xFF; // Equivalent to operatorId % 256 - } - function updateMultipleWhitelists( address[] calldata whitelistAddresses, uint64[] calldata operatorIds, @@ -129,41 +124,15 @@ library OperatorLib { if (addressesLength == 0) revert ISSVNetworkCore.InvalidWhitelistAddressesLength(); if (operatorsLength == 0) revert ISSVNetworkCore.InvalidOperatorIdsLength(); - uint64 currentOperatorId; - uint64 nextOperatorId; - uint256 blockIndex; - uint256 bitPosition; - // create the max number of masks that will be updated - uint256[] memory masks = new uint256[]((operatorIds[operatorsLength - 1] >> 8) + 1); - - for (uint256 i = 0; i < operatorsLength - 1; ++i) { - currentOperatorId = operatorIds[i]; - - checkOwner(s.operators[currentOperatorId]); - - if (i + 1 < operatorsLength) { - nextOperatorId = operatorIds[i + 1]; - if (currentOperatorId >= nextOperatorId) { - if (currentOperatorId == nextOperatorId) { - revert ISSVNetworkCore.OperatorsListNotUnique(); - } - revert ISSVNetworkCore.UnsortedOperatorsList(); - } - } - (blockIndex, bitPosition) = getBitmapIndexes(currentOperatorId); - - masks[blockIndex] |= (1 << bitPosition); - - if (!s.operators[currentOperatorId].whitelisted) s.operators[currentOperatorId].whitelisted = true; - } + uint256[] memory masks = generateBlockMasks(operatorIds); for (uint256 i = 0; i < addressesLength; ++i) { address addr = whitelistAddresses[i]; if (isWhitelistingContract(addr)) revert ISSVNetworkCore.AddressIsWhitelistingContract(addr); - for (blockIndex = 0; blockIndex < masks.length; ++blockIndex) { + for (uint256 blockIndex; blockIndex < masks.length; ++blockIndex) { // only update storage for updated masks if (masks[blockIndex] != 0) { if (addAddresses) { @@ -190,14 +159,49 @@ library OperatorLib { (uint256 blockIndex, uint256 bitPosition) = OperatorLib.getBitmapIndexes(operatorId); delete s.operatorsWhitelist[operatorId]; s.addressWhitelistedForOperators[currentWhitelisted][blockIndex] |= (1 << bitPosition); + } else { + s.operators[operatorId].whitelisted = true; } s.operatorsWhitelist[operatorId] = address(whitelistingContract); - if (!s.operators[operatorId].whitelisted) s.operators[operatorId].whitelisted = true; + } + + function getBitmapIndexes(uint64 operatorId) internal pure returns (uint256 blockIndex, uint256 bitPosition) { + blockIndex = operatorId >> 8; // Equivalent to operatorId / 256 + bitPosition = operatorId & 0xFF; // Equivalent to operatorId % 256 } function isWhitelistingContract(address whitelistingContract) internal view returns (bool) { // TODO create type for whitelisting contracts? return ERC165Checker.supportsInterface(whitelistingContract, type(ISSVWhitelistingContract).interfaceId); } + + function generateBlockMasks(uint64[] calldata operatorIds) internal pure returns (uint256[] memory masks) { + uint256 blockIndex; + uint256 bitPosition; + + uint256 operatorsLength = operatorIds.length; + + // create the max number of masks that will be updated + masks = new uint256[]((operatorIds[operatorsLength - 1] >> 8) + 1); + + for (uint256 i = 0; i < operatorsLength; ++i) { + /* check if its not required to pass ordered operator ids + if (checkOwner) checkOwner(s.operators[currentOperatorId]); + + if (i + 1 < operatorsLength) { + nextOperatorId = operatorIds[i + 1]; + if (currentOperatorId >= nextOperatorId) { + if (currentOperatorId == nextOperatorId) { + revert ISSVNetworkCore.OperatorsListNotUnique(); + } + revert ISSVNetworkCore.UnsortedOperatorsList(); + } + } + */ + (blockIndex, bitPosition) = getBitmapIndexes(operatorIds[i]); + + masks[blockIndex] |= (1 << bitPosition); + } + } } diff --git a/contracts/modules/SSVOperatorsWhitelist.sol b/contracts/modules/SSVOperatorsWhitelist.sol index f084d74c..6fd0b082 100644 --- a/contracts/modules/SSVOperatorsWhitelist.sol +++ b/contracts/modules/SSVOperatorsWhitelist.sol @@ -27,7 +27,6 @@ contract SSVOperatorsWhitelist is ISSVOperatorsWhitelist { (uint256 blockIndex, uint256 bitPosition) = OperatorLib.getBitmapIndexes(operatorId); s.addressWhitelistedForOperators[whitelistAddress][blockIndex] |= (1 << bitPosition); - if (!s.operators[operatorId].whitelisted) s.operators[operatorId].whitelisted = true; emit OperatorWhitelistUpdated(operatorId, whitelistAddress); } @@ -62,4 +61,24 @@ contract SSVOperatorsWhitelist is ISSVOperatorsWhitelist { // TODO test set event param type to ISSVOperatorsWhitelist emit OperatorWhitelistingContractUpdated(operatorIds, address(whitelistingContract)); } + + function removeOperatorsWhitelistingContract(uint64[] calldata operatorIds) external { + uint256 operatorsLength = operatorIds.length; + if (operatorsLength == 0) revert InvalidOperatorIdsLength(); + + StorageData storage s = SSVStorage.load(); + + Operator memory operator; + for (uint256 i = 0; i < operatorsLength; ++i) { + operator = s.operators[operatorIds[i]]; + + operator.checkOwner(); + operator.whitelisted = false; + + s.operatorsWhitelist[operatorIds[i]] = address(0); + s.operators[operatorIds[i]] = operator; + } + + emit OperatorWhitelistingContractUpdated(operatorIds, address(0)); + } } diff --git a/contracts/modules/SSVViews.sol b/contracts/modules/SSVViews.sol index 48a7fc17..7881cd48 100644 --- a/contracts/modules/SSVViews.sol +++ b/contracts/modules/SSVViews.sol @@ -49,13 +49,69 @@ contract SSVViews is ISSVViews { ); } - function getOperatorById(uint64 operatorId) external view returns (address, uint256, uint32, address, bool, bool) { + function getOperatorById( + uint64 operatorId + ) external view override returns (address, uint256, uint32, address, bool, bool) { ISSVNetworkCore.Operator memory operator = SSVStorage.load().operators[operatorId]; - address whitelisted = SSVStorage.load().operatorsWhitelist[operatorId]; - bool isPrivate = whitelisted == address(0) ? false : true; + + address whitelistedContract = SSVStorage.load().operatorsWhitelist[operatorId]; + bool useWhitelistedContract = OperatorLib.isWhitelistingContract(whitelistedContract); bool isActive = operator.snapshot.block == 0 ? false : true; - return (operator.owner, operator.fee.expand(), operator.validatorCount, whitelisted, isPrivate, isActive); + return ( + operator.owner, + operator.fee.expand(), + operator.validatorCount, + whitelistedContract, + useWhitelistedContract, + isActive + ); + } + + function getWhitelistedOperators( + uint64[] calldata operatorIds, + address whitelistedAddress + ) external view override returns (uint64[] memory whitelistedOperatorIds) { + uint256 operatorsLength = operatorIds.length; + if (operatorsLength == 0) return whitelistedOperatorIds; + + StorageData storage s = SSVStorage.load(); + + // create the max number of masks that will be updated + uint256[] memory masks = OperatorLib.generateBlockMasks(operatorIds); + + uint256 count = 0; + whitelistedOperatorIds = new uint64[](operatorsLength); + + uint256 whitelistedMask; + uint256 matchedMask; + + // Check whitelisting status for each mask + for (uint256 blockIndex; blockIndex < masks.length; ++blockIndex) { + // Only check blocks that have operator IDs + if (masks[blockIndex] != 0) { + whitelistedMask = s.addressWhitelistedForOperators[whitelistedAddress][blockIndex]; + + // This will give the matching whitelisted operators + matchedMask = whitelistedMask & masks[blockIndex]; + + // Now we need to extract operator IDs from matchedMask + uint256 blockPointer = blockIndex << 8; + for (uint256 bit = 0; bit < 256; bit++) { + if (matchedMask & (1 << bit) != 0) { + whitelistedOperatorIds[count++] = uint64(blockPointer + bit); + if (count == operatorsLength) { + return whitelistedOperatorIds; // Early termination + } + } + } + } + } + + // Resize whitelistedOperatorIds to the actual number of whitelisted operators + assembly { + mstore(whitelistedOperatorIds, count) + } } /***********************************/ diff --git a/package-lock.json b/package-lock.json index 7dcaf611..9740eaeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ssv-network", - "version": "1.1.1", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ssv-network", - "version": "1.1.1", + "version": "1.2.0", "license": "MIT", "devDependencies": { "@nomicfoundation/edr": "^0.3.4", @@ -17,7 +17,7 @@ "@openzeppelin/contracts-upgradeable": "^4.9.6", "@openzeppelin/hardhat-upgrades": "^3.0.5", "dotenv": "^16.4.5", - "hardhat": "^2.22.2", + "hardhat": "^2.22.3", "hardhat-abi-exporter": "^2.10.1", "hardhat-contract-sizer": "^2.10.0", "solidity-coverage": "^0.8.12", @@ -1201,29 +1201,27 @@ } }, "node_modules/@nomicfoundation/edr": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.3.4.tgz", - "integrity": "sha512-e4jzVeJ+VTKBFzNgKDbSVnGVbHYNZHIfMdgifQBugXPiIa6QEUzZqleh2+y4lhkXcCthnFyrTYe3jiEpUzr3cA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.3.5.tgz", + "integrity": "sha512-dPSM9DuI1sr71gqWUMgLo8MjHQWO4+WNDm3iWaT6P4vUFJReZX5qwA5X+3UwIPBry8GvNY084u7yWUvB3/8rqA==", "dev": true, "engines": { "node": ">= 18" }, "optionalDependencies": { - "@nomicfoundation/edr-darwin-arm64": "0.3.4", - "@nomicfoundation/edr-darwin-x64": "0.3.4", - "@nomicfoundation/edr-linux-arm64-gnu": "0.3.4", - "@nomicfoundation/edr-linux-arm64-musl": "0.3.4", - "@nomicfoundation/edr-linux-x64-gnu": "0.3.4", - "@nomicfoundation/edr-linux-x64-musl": "0.3.4", - "@nomicfoundation/edr-win32-arm64-msvc": "0.3.4", - "@nomicfoundation/edr-win32-ia32-msvc": "0.3.4", - "@nomicfoundation/edr-win32-x64-msvc": "0.3.4" + "@nomicfoundation/edr-darwin-arm64": "0.3.5", + "@nomicfoundation/edr-darwin-x64": "0.3.5", + "@nomicfoundation/edr-linux-arm64-gnu": "0.3.5", + "@nomicfoundation/edr-linux-arm64-musl": "0.3.5", + "@nomicfoundation/edr-linux-x64-gnu": "0.3.5", + "@nomicfoundation/edr-linux-x64-musl": "0.3.5", + "@nomicfoundation/edr-win32-x64-msvc": "0.3.5" } }, "node_modules/@nomicfoundation/edr-darwin-arm64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.4.tgz", - "integrity": "sha512-tjavrUFLWnkn0PI+jk0D83hP2jjbmeXT1QLd5NtIleyGrJ00ZWVl+sfuA2Lle3kzfOceoI2VTR0n1pZB4KJGbQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.5.tgz", + "integrity": "sha512-gIXUIiPMUy6roLHpNlxf15DumU7/YhffUf7XIB+WUjMecaySfTGyZsTGnCMJZqrDyiYqWPyPKwCV/2u/jqFAUg==", "cpu": [ "arm64" ], @@ -1237,9 +1235,9 @@ } }, "node_modules/@nomicfoundation/edr-darwin-x64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.4.tgz", - "integrity": "sha512-dXO0vlIoBosp8gf5/ah3dESMymjwit0Daef1E4Ew3gZ8q3LAdku0RC+YEQJi9f0I3QNfdgIrBTzibRZUoP+kVA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.5.tgz", + "integrity": "sha512-0MrpOCXUK8gmplpYZ2Cy0holHEylvWoNeecFcrP2WJ5DLQzrB23U5JU2MvUzOJ7aL76Za1VXNBWi/UeTWdHM+w==", "cpu": [ "x64" ], @@ -1253,9 +1251,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.4.tgz", - "integrity": "sha512-dv38qmFUaqkkeeA9S0JjerqruytTfHav7gbPLpZUAEXPlJGo49R0+HQxd45I0msbm6NAXbkmKEchTLApp1ohaA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.5.tgz", + "integrity": "sha512-aw9f7AZMiY1dZFNePJGKho2k+nEgFgzUAyyukiKfSqUIMXoFXMf1U3Ujv848czrSq9c5XGcdDa2xnEf3daU3xg==", "cpu": [ "arm64" ], @@ -1269,9 +1267,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-arm64-musl": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.4.tgz", - "integrity": "sha512-CfEsb6gdCMVIlRSpWYTxoongEKHB60V6alE/y8mkfjIo7tA95wyiuvCtyo3fpiia3wQV7XoMYgIJHObHiKLKtA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.5.tgz", + "integrity": "sha512-cVFRQjyABBlsbDj+XTczYBfrCHprZ6YNzN8gGGSqAh+UGIJkAIRomK6ar27GyJLNx3HkgbuDoi/9kA0zOo/95w==", "cpu": [ "arm64" ], @@ -1285,9 +1283,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-x64-gnu": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.4.tgz", - "integrity": "sha512-V0CpJA2lYWulgTR+zP11ftBAEwkpMAAki/AuMu3vd7HoPfjwIDzWDQR5KFU17qFmqAVz0ICRxsxDlvvBZ/PUxA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.5.tgz", + "integrity": "sha512-CjOg85DfR1Vt0fQWn5U0qi26DATK9tVzo3YOZEyI0JBsnqvk43fUTPv3uUAWBrPIRg5O5kOc9xG13hSpCBBxBg==", "cpu": [ "x64" ], @@ -1301,9 +1299,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-x64-musl": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.4.tgz", - "integrity": "sha512-0sgTrwZajarukerU/QSb+oRdlQLnJdd7of8OlXq2wtpeTNTqemgCOwY2l2qImbWboMpVrYgcmGbINXNVPCmuJw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.5.tgz", + "integrity": "sha512-hvX8bBGpBydAVevzK8jsu2FlqVZK1RrCyTX6wGHnltgMuBaoGLHYtNHiFpteOaJw2byYMiORc2bvj+98LhJ0Ew==", "cpu": [ "x64" ], @@ -1316,42 +1314,10 @@ "node": ">= 18" } }, - "node_modules/@nomicfoundation/edr-win32-arm64-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-arm64-msvc/-/edr-win32-arm64-msvc-0.3.4.tgz", - "integrity": "sha512-bOl3vhMtV0W9ozUMF5AZRBWw1183hhhx+e1YJdDLMaqNkBUFYi2CZbMYefDylq2OKQtOQ0gPLhZvn+z2D21Ztw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/edr-win32-ia32-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-ia32-msvc/-/edr-win32-ia32-msvc-0.3.4.tgz", - "integrity": "sha512-yKQCpAX0uB2dalsSwOkau3yfNXkwBJa/Ks2OPl9AjHqJ+E8AqvBEB9jRpfQrdPzElMsgZuN4mqE+wh+JxY+0Aw==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 18" - } - }, "node_modules/@nomicfoundation/edr-win32-x64-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.4.tgz", - "integrity": "sha512-fResvsL/fSucep1K5W6iOs8lqqKKovHLsAmigMzAYVovqkyZKgCGVS/D8IVxA0nxuGCOlNxFnVmwWtph3pbKWA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.5.tgz", + "integrity": "sha512-IJXjW13DY5UPsx/eG5DGfXtJ7Ydwrvw/BTZ2Y93lRLHzszVpSmeVmlxjZP5IW2afTSgMLaAAsqNw4NhppRGN8A==", "cpu": [ "x64" ], @@ -6443,14 +6409,14 @@ "dev": true }, "node_modules/hardhat": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.22.2.tgz", - "integrity": "sha512-0xZ7MdCZ5sJem4MrvpQWLR3R3zGDoHw5lsR+pBFimqwagimIOn3bWuZv69KA+veXClwI1s/zpqgwPwiFrd4Dxw==", + "version": "2.22.3", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.22.3.tgz", + "integrity": "sha512-k8JV2ECWNchD6ahkg2BR5wKVxY0OiKot7fuxiIpRK0frRqyOljcR2vKwgWSLw6YIeDcNNA4xybj7Og7NSxr2hA==", "dev": true, "dependencies": { "@ethersproject/abi": "^5.1.2", "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/edr": "^0.3.1", + "@nomicfoundation/edr": "^0.3.5", "@nomicfoundation/ethereumjs-common": "4.0.4", "@nomicfoundation/ethereumjs-tx": "5.0.4", "@nomicfoundation/ethereumjs-util": "9.0.4", diff --git a/package.json b/package.json index d815c59c..221fa6f8 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@openzeppelin/contracts-upgradeable": "^4.9.6", "@openzeppelin/hardhat-upgrades": "^3.0.5", "dotenv": "^16.4.5", - "hardhat": "^2.22.2", + "hardhat": "^2.22.3", "hardhat-abi-exporter": "^2.10.1", "hardhat-contract-sizer": "^2.10.0", "solidity-coverage": "^0.8.12",