Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- contract Ownable {
- address public owner;
- // Sets the sender address as the `owner`.
- function Ownable() internal {
- owner = msg.sender;
- }
- // Throws an exception if called by any account other than the `owner`.
- modifier onlyOwner() {
- require(msg.sender == owner);
- _;
- }
- }
- import './Ownable.sol';
- contract MyContract is Ownable {
- function start() external onlyOwner {
- ...
- }
- function stop() external onlyOwner {
- ...
- }
- }
Add Comment
Please, Sign In to add comment