Skip to content

Instantly share code, notes, and snippets.

@MichalZalecki MichalZalecki/SimpleToken.sol Secret
Created Jul 3, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.