Commit 11865206 by LaimeJesus Committed by Nicolás Venturo

add improvement in simpletoken example #1458 (#1473)

* add improvement in simpletoken example #1458

* fix not calling decimals get function in initial supply
parent b5892a2b
pragma solidity ^0.4.24;
import "../token/ERC20/ERC20.sol";
import "../token/ERC20/ERC20Detailed.sol";
/**
* @title SimpleToken
......@@ -8,18 +9,14 @@ import "../token/ERC20/ERC20.sol";
* Note they can later distribute these tokens as they wish using `transfer` and other
* `ERC20` functions.
*/
contract SimpleToken is ERC20 {
contract SimpleToken is ERC20, ERC20Detailed {
string public constant name = "SimpleToken";
string public constant symbol = "SIM";
uint8 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals()));
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor() public {
constructor() public ERC20Detailed("SimpleToken", "SIM", 18) {
_mint(msg.sender, INITIAL_SUPPLY);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment