Skip to content

Instantly share code, notes, and snippets.

@MichalZalecki
Created July 3, 2018 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichalZalecki/00e90578e1eb43efaf337893d6d7bdf5 to your computer and use it in GitHub Desktop.
Save MichalZalecki/00e90578e1eb43efaf337893d6d7bdf5 to your computer and use it in GitHub Desktop.
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