From c291168264c4e1036a14f1a25f11286f8675c5b7 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:20:54 -0700 Subject: [PATCH 01/10] feat: Add _updateStatsOnAdd Internal Function --- src/IdentityManagerV2.sol | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index 10fe07b..8706ed2 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -576,4 +576,15 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { usersByType[userType].pop(); delete userPositions[userType][user]; } + + function _updateStatsOnAdd(VerificationLevel level) internal { + stats.totalVerifications++; + stats.activeVerifications++; + + if (level == VerificationLevel.DEVICE) { + stats.deviceVerifications++; + } else if (level == VerificationLevel.ORB) { + stats.orbVerifications++; + } + } } From 27359ac7abd25305856ce23026f850a808cb6caf Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:21:17 -0700 Subject: [PATCH 02/10] feat: Add _updateStatsOnAdd Internal Function Natspec Comments --- src/IdentityManagerV2.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index 8706ed2..4301f46 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -577,6 +577,9 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { delete userPositions[userType][user]; } + /** + * @notice Updates statistics when adding verification + */ function _updateStatsOnAdd(VerificationLevel level) internal { stats.totalVerifications++; stats.activeVerifications++; From fa44ac8ea4086eb4b6beb3de9f4f6b7c281304fa Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:22:29 -0700 Subject: [PATCH 03/10] feat: Add _updateStatsOnRevoke Internal Function Natspec Comments --- src/IdentityManagerV2.sol | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index 4301f46..3e983ab 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -590,4 +590,12 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { stats.orbVerifications++; } } + /** + * @notice Updates statistics when revoking verification + */ + function _updateStatsOnRevoke(VerificationLevel level) internal { + if (stats.activeVerifications > 0) { + stats.activeVerifications--; + } + } } From b12b87a14d73c36b8301cc7faf5064b1ac86155c Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:22:42 -0700 Subject: [PATCH 04/10] feat: forge fmt --- src/IdentityManagerV2.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index 3e983ab..472f933 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -590,9 +590,10 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { stats.orbVerifications++; } } - /** + /** * @notice Updates statistics when revoking verification */ + function _updateStatsOnRevoke(VerificationLevel level) internal { if (stats.activeVerifications > 0) { stats.activeVerifications--; From e73205d98101865d122ee1130d1edae885e74a43 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:26:20 -0700 Subject: [PATCH 05/10] modify: IdentityManagerV2 Contract --- src/IdentityManagerV2.sol | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index 472f933..10fe07b 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -576,27 +576,4 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { usersByType[userType].pop(); delete userPositions[userType][user]; } - - /** - * @notice Updates statistics when adding verification - */ - function _updateStatsOnAdd(VerificationLevel level) internal { - stats.totalVerifications++; - stats.activeVerifications++; - - if (level == VerificationLevel.DEVICE) { - stats.deviceVerifications++; - } else if (level == VerificationLevel.ORB) { - stats.orbVerifications++; - } - } - /** - * @notice Updates statistics when revoking verification - */ - - function _updateStatsOnRevoke(VerificationLevel level) internal { - if (stats.activeVerifications > 0) { - stats.activeVerifications--; - } - } } From 54a66d072c73ca681f9f3bc1624e31d4468c7bdc Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:28:39 -0700 Subject: [PATCH 06/10] feat: Add _updateStatsOnAdd Internal Function --- src/IdentityManagerV2.sol | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index 10fe07b..8706ed2 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -576,4 +576,15 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { usersByType[userType].pop(); delete userPositions[userType][user]; } + + function _updateStatsOnAdd(VerificationLevel level) internal { + stats.totalVerifications++; + stats.activeVerifications++; + + if (level == VerificationLevel.DEVICE) { + stats.deviceVerifications++; + } else if (level == VerificationLevel.ORB) { + stats.orbVerifications++; + } + } } From 2155a50a3057c810e908b7c91740ad2aa8a82107 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:28:58 -0700 Subject: [PATCH 07/10] feat: Add _updateStatsOnAdd Internal Function Natspec Comments --- src/IdentityManagerV2.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index 8706ed2..4301f46 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -577,6 +577,9 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { delete userPositions[userType][user]; } + /** + * @notice Updates statistics when adding verification + */ function _updateStatsOnAdd(VerificationLevel level) internal { stats.totalVerifications++; stats.activeVerifications++; From fa8c5e65ace1db40d769f3d6df87b7cd86996858 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:29:25 -0700 Subject: [PATCH 08/10] feat: Add _updateStatsOnRevoke Internal Function --- src/IdentityManagerV2.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index 4301f46..67f7dbd 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -590,4 +590,11 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { stats.orbVerifications++; } } + + function _updateStatsOnRevoke(VerificationLevel level) internal { + if (stats.activeVerifications > 0) { + stats.activeVerifications--; + } + } + } From dc51da54665ff433f481115dd8809edfc688eb44 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:29:43 -0700 Subject: [PATCH 09/10] feat: Add _updateStatsOnRevoke Internal Function Natspec Comments --- src/IdentityManagerV2.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index 67f7dbd..f114c79 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -591,6 +591,9 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { } } + /** + * @notice Updates statistics when revoking verification + */ function _updateStatsOnRevoke(VerificationLevel level) internal { if (stats.activeVerifications > 0) { stats.activeVerifications--; From 6484a4ea218a5267dd90d97e8a6a86706559a135 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Fri, 26 Sep 2025 09:30:04 -0700 Subject: [PATCH 10/10] feat: forge fmt --- src/IdentityManagerV2.sol | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/IdentityManagerV2.sol b/src/IdentityManagerV2.sol index f114c79..b628708 100644 --- a/src/IdentityManagerV2.sol +++ b/src/IdentityManagerV2.sol @@ -591,7 +591,7 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { } } - /** + /** * @notice Updates statistics when revoking verification */ function _updateStatsOnRevoke(VerificationLevel level) internal { @@ -599,5 +599,4 @@ contract IdentityManagerV2 is AccessControl, ReentrancyGuard, Pausable { stats.activeVerifications--; } } - }