From 68de076eb2f94f6e5c9637d9f87275f3d89f7450 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sun, 14 Jul 2024 21:31:44 +0700 Subject: [PATCH] Create blockchain_identity_verification.sol --- .../blockchain_identity_verification.sol | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 features/blockchain_identity_verification/blockchain_identity_verification.sol diff --git a/features/blockchain_identity_verification/blockchain_identity_verification.sol b/features/blockchain_identity_verification/blockchain_identity_verification.sol new file mode 100644 index 000000000..01f6f0dde --- /dev/null +++ b/features/blockchain_identity_verification/blockchain_identity_verification.sol @@ -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]; + } +}