Skip to content

Instantly share code, notes, and snippets.

@himanshuchawla009
Created April 24, 2018 09:54
Show Gist options
  • Select an option

  • Save himanshuchawla009/d6a67a816e579dc1012368898ec52f5b to your computer and use it in GitHub Desktop.

Select an option

Save himanshuchawla009/d6a67a816e579dc1012368898ec52f5b to your computer and use it in GitHub Desktop.
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