Skip to content

Instantly share code, notes, and snippets.

@david30907d
Created August 9, 2022 11:45
Show Gist options
  • Save david30907d/a8fd7659c1322a6a06572ff4ebb22054 to your computer and use it in GitHub Desktop.
Save david30907d/a8fd7659c1322a6a06572ff4ebb22054 to your computer and use it in GitHub Desktop.
contract TornadoCash is Ownerhip {
mapping(address=>bool) isBlacklisted;
function blackList(address _user) public onlyOwner {
require(!isBlacklisted[_user], "user already blacklisted");
isBlacklisted[_user] = true;
// emit events as well
}
function transfer(address _to, uint256 _value) public {
require(!isBlacklisted[_to], "Recipient is backlisted");
// remaining transfer logic
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment