Last active
January 3, 2022 20:03
-
-
Save m1guelpf/e9d9029009159f761af6843a0c4bfe41 to your computer and use it in GitHub Desktop.
A lil identity namespace contract in response to jsngr's tweet: https://twitter.com/jsngr/status/1478090387101302789
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: Unlicense | |
pragma solidity 0.8.10; | |
contract PRMTVS { | |
struct Identity { | |
string name; | |
string bio; | |
string email; | |
string website; | |
} | |
event IdentityUpdated(address indexed user, Identity identity); | |
mapping(address => Identity) public lookup; | |
function update(Identity memory data) public payable { | |
lookup[msg.sender] = data; | |
emit IdentityUpdated(msg.sender, data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment