Created
August 9, 2022 21:06
-
-
Save AyDeveloper/95da033626d379451ccb6f99842d23ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Owner { | |
address owner; | |
function setOwner() public { | |
owner = msg.sender; | |
} | |
} | |
contract Suicide is Owner { | |
function destroy() public { | |
if (msg.sender == owner) selfdestruct(payable(owner)); | |
} | |
} | |
contract EndGame is Suicide { | |
function kill() public { | |
super.destroy(); // Calls kill() of mortal. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment