Created
April 24, 2018 09:54
-
-
Save himanshuchawla009/d6a67a816e579dc1012368898ec52f5b 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.18; | |
| import "./DelegateV1.sol"; | |
| import "./StorageState.sol"; | |
| import "./Ownable.sol"; | |
| contract DelegateV2 is StorageState { | |
| modifier onlyOwner() { | |
| require(msg.sender == _storage.getAddress("owner")); | |
| _; | |
| } | |
| function setNumberOfOwners(uint num) public onlyOwner { | |
| _storage.setUint("total", num); | |
| } | |
| function getNumberOfOwners() view public returns (uint) { | |
| return _storage.getUint("total"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment