Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pragma solidity ^0.5.7;
contract KillBilly {
bool public is_killable;
mapping (address => bool) public approved_killers;
constructor() public {
is_killable = false;
}
function killerize(address addr) public {
approved_killers[addr] = true;
}
function activatekillability() public {
require(approved_killers[msg.sender] == true);
is_killable = true;
}
function commencekilling() public {
require(is_killable);
selfdestruct(msg.sender);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.