Verification Contract
The verification contract manages verifiers and users verified by them. It allows:
- Management (addition and removal) of verifiers by the admin
- Management of user verification by verifiers
It helps to think of each verification as a separate identity of the user, similar to how one would have multiple digital accounts like Twitter, Github, or Youtube. Each identity can thus be thought of as There is an associated master address, to which additional child addresses can be linked (this is an important feature since oftentimes users utilize multiple wallet addresses actively).
- by deploying the contract
- gaining ownership from previous owner
- Can transfer ownership to another admin
- Can update contract implementation addresses
- Onboarded by admin
- Can register, unregister user addresses to their verification method
Adding a verifier is akin to adding a new verification method. The verifier handles all aspects of the registration process related to their verification method. Currently, new verifiers can only be added via admin.
function addVerifier(address _verifier) external onlyOwner {
- None
- Only admin can call this function for now
- Every verifier needs to be unique
_verifier
: address of the verifier for the new verification method
Registering a user involves adding their address to the verifier's mapping. This simply involves setting
masterAddresses[_masterAddress][msg.sender]
as true
to indicate _masterAddress
is verified by msg.sender.
function registerMasterAddress(address _masterAddress, bool _isMasterLinked)
external override onlyVerifier {
- None
_masterAddress
mustn't already be registered withmsg.sender
_masterAddress
: Address of the user being verified_isMasterLinked
: iftrue
,_masterAddress
will be usable to perform other functions (such as identifying users registered with a verifier). Iffalse
_masterAddress
will purely be considered for registering the user. Further addresses associated with the_masterAddress
vialinkAddress()
will only be considered for any activities pertaining to verification.
Last modified 1yr ago