Skip to content

Conversation

malgus01
Copy link
Contributor

Pull Request

Summary

This PR enhances the IdentityManagerV2 contract by introducing essential mappings and platform statistics for improved verification tracking and user management.

Changes

  • Added platform statistics
    • Introduced VerificationStats public stats to maintain global verification metrics.
  • Added mappings with full Natspec documentation
    • nullifierHashes: track used nullifier hashes.
    • userVerifications: map user addresses to their verification data.
    • usersByType: group verified users by UserType.
    • userPositions: track user indices in usersByType arrays for efficient removal.
    • verifiedUserPositions: track user indices in verifiedUsers array for efficient removal.
  • Added verifiedUsers array for easy enumeration of all verified accounts.
  • Formatting
    • Ran forge fmt for consistent code style.

Motivation

These changes introduce core data structures needed for:

  • Efficient user verification tracking.
  • Organized user management by type.
  • Improved on-chain analytics via platform statistics.
  • Easier user enumeration and removal operations.

@0xRiz0 0xRiz0 self-requested a review September 15, 2025 03:35
@0xRiz0 0xRiz0 added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 15, 2025
@0xRiz0 0xRiz0 merged commit 72d592e into CrediChain:main Sep 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants