mirror of https://github.com/ConsenSys/mythril
blockchainethereumsmart-contractssoliditysecurityprogram-analysissecurity-analysissymbolic-execution
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
468 B
24 lines
468 B
2 years ago
|
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);
|
||
|
}
|
||
|
}
|