Skip to content

Commit

Permalink
Create blockchain_identity_verification.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 14, 2024
1 parent e9c2b97 commit 68de076
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// File name: blockchain_identity_verification.sol
pragma solidity ^0.8.0;

contract BlockchainIdentityVerification {
address private owner;
mapping (address => string) public identities;

constructor() public {
owner = msg.sender;
}

function verifyIdentity(address user, string identity) public {
require(msg.sender == owner, "Only the owner can verify identities");
identities[user] = identity;
}

function getIdentity(address user) public view returns (string) {
return identities[user];
}
}

0 comments on commit 68de076

Please sign in to comment.