VC contract
Last updated
Last updated
The Verifiable Credentials (VC) contract is the backbone of the Humanity Protocol's verification system. It enables user registration, verification management, and tracks referral relationships.
Testnet:
The VC contract provides essential functionality to establish and verify human identities on the blockchain. It maintains a registry of users, tracks verification status, and manages referral relationships.
User registry maintaining address, referrer, and verification status
Social Media verification that supports multiple platforms
Referral tree tracking up to 10 levels deep
Batch processing for efficient registration and verification operations
DEFAULT_ADMIN_ROLE
: Full administrative access, can grant other roles
REGISTRATION_ADMIN_ROLE
: Can register new users to the system
VERIFICATION_ADMIN_ROLE
: Can verify users and manage social verifications
A contract with REGISTRATION_ADMIN_ROLE
calls register(userAddress, referrerAddress)
The contract checks if the user already exists (reverts if true)
The contract checks if the referrer exists (reverts if referrer is specified but doesn't exist)
The user is added to the registry and total user count is incremented
A UserRegistered
event is emitted
A contract with VERIFICATION_ADMIN_ROLE
calls verifyUser(user)
The contract checks if the user exists and is not already verified
The user's verification status is updated to true
The total verified user count is incremented
A UserVerified
event is emitted
A contract with VERIFICATION_ADMIN_ROLE
calls batchSocialVC()
with a list of params
For each social verification, the contract:
Updates the verification status for the specific social network
Updates the count of verified social networks for the user
Emits either SocialVCVerified
or SocialVCRevoked
based on operation