Created
April 4, 2018 14:54
-
-
Save ayinot/90886366d84af082e6c3ab5ca4ac7d5d to your computer and use it in GitHub Desktop.
related to contract upgradation
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 "./ShrimpCoin.sol"; | |
| contract MintableTokenDelegate is TokenDelegate { | |
| modifier onlyOwner { | |
| require(msg.sender == _storage.getAddress("owner")); | |
| _; | |
| } | |
| modifier canMint() { | |
| require(!_storage.getBool("mintingFinished")); | |
| _; | |
| } | |
| function mint(address to, uint256 amount) onlyOwner canMint public returns (bool) { | |
| addSupply(amount); | |
| addBalance(to, amount); | |
| return true; | |
| } | |
| function finishMinting() onlyOwner canMint public returns (bool) { | |
| _storage.setBool("mintingFinished", true); | |
| return true; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment