Last active
May 14, 2018 11:13
-
-
Save GaneshSaiKumar/9b90e185bb8843cc4e5087acfb02e3e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
pragma solidity ^0.4.0; | |
contract useModifier{ | |
address owner; | |
function Constructor() private{ | |
owner = msg.sender; | |
} | |
function kill() private onlyowner{ | |
selfdestruct(owner); | |
} | |
modifier onlyowner(){ | |
if(owner == msg.sender){ | |
_; | |
} | |
else{ | |
revert(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment