Skip to content

Instantly share code, notes, and snippets.

@GaneshSaiKumar
Last active May 14, 2018 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GaneshSaiKumar/9b90e185bb8843cc4e5087acfb02e3e2 to your computer and use it in GitHub Desktop.
Save GaneshSaiKumar/9b90e185bb8843cc4e5087acfb02e3e2 to your computer and use it in GitHub Desktop.
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