-
-
Save MichalZalecki/00e90578e1eb43efaf337893d6d7bdf5 to your computer and use it in GitHub Desktop.
This file contains 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.24; | |
import "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol"; | |
contract SimpleToken is DetailedERC20, StandardToken { | |
constructor( | |
string _name, | |
string _symbol, | |
uint8 _decimals, | |
uint256 _amount | |
) | |
DetailedERC20(_name, _symbol, _decimals) | |
public | |
{ | |
require(_amount > 0, "amount has to be greater than 0"); | |
totalSupply_ = _amount.mul(10 ** uint256(_decimals)); | |
balances[msg.sender] = totalSupply_; | |
emit Transfer(address(0), msg.sender, totalSupply_); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment