Skip to content

Instantly share code, notes, and snippets.

@abramsymons
Created May 12, 2020 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abramsymons/8d77809c5205ba5221b65af6ac01a7e2 to your computer and use it in GitHub Desktop.
Save abramsymons/8d77809c5205ba5221b65af6ac01a7e2 to your computer and use it in GitHub Desktop.
pragma solidity ^0.6.3;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
contract BrightID is Ownable {
event Verified(address indexed addr);
event Revoked(address indexed addr);
mapping(address => bool) public verifications;
mapping(address => address) public history;
function verify(address addr, address revoked) public onlyOwner
{
require(history[addr]!=address(0), "address is verified before");
require(addr!=revoked, "revoked is equal with address");
verifications[addr] = true;
verifications[revoked] = false;
history[addr] = revoked;
emit Verified(addr);
emit Revoked(addr);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment