Skip to content

Instantly share code, notes, and snippets.

@m1guelpf
Last active January 3, 2022 20:03
Show Gist options
  • Save m1guelpf/e9d9029009159f761af6843a0c4bfe41 to your computer and use it in GitHub Desktop.
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
// 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