Skip to content

Commit 31d58f5

Browse files
committed
adding premier token
1 parent 1ea84a5 commit 31d58f5

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

PreMint.sol

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ contract SRTToken is Ownable,StandardToken,WhiteListedContracts {
150150
string constant public symbol = 'SRPMT';
151151
uint constant public decimals = 18;
152152
uint256 public totalSupply;
153+
uint256 public maxSupply;
153154

154155
/* Contructor function to set initial balance and assign to owner*/
155-
function SRTToken(uint256 _totalSupply){
156-
totalSupply = _totalSupply * 10**decimals;
157-
balances[msg.sender] = balances[msg.sender].add(totalSupply);
156+
function SRTToken(uint256 _maxSupply){
157+
maxSupply = _maxSupply * 10**decimals;
158158
}
159159

160160
/*
@@ -176,4 +176,18 @@ contract SRTToken is Ownable,StandardToken,WhiteListedContracts {
176176
return true;
177177
}
178178

179+
/**
180+
* @dev Function to mint tokens
181+
* @param _to The address that will receive the minted tokens.
182+
* @param _amount The amount of tokens to mint.
183+
* @return A boolean that indicates if the operation was successful.
184+
*/
185+
function mint(uint256 _amount) onlyOwner public returns (bool) {
186+
require(maxSupply>(totalSupply.add(_amount)));
187+
totalSupply = totalSupply.add(_amount);
188+
balances[msg.sender] = balances[msg.sender].add(_amount);
189+
Transfer(address(0), msg.sender, _amount);
190+
return true;
191+
}
192+
179193
}

0 commit comments

Comments
 (0)