SimpleToken.sol 650 B

123456789101112131415161718192021
  1. pragma solidity ^0.5.0;
  2. import "../GSN/Context.sol";
  3. import "../token/ERC20/ERC20.sol";
  4. import "../token/ERC20/ERC20Detailed.sol";
  5. /**
  6. * @title SimpleToken
  7. * @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator.
  8. * Note they can later distribute these tokens as they wish using `transfer` and other
  9. * `ERC20` functions.
  10. */
  11. contract SimpleToken is Context, ERC20, ERC20Detailed {
  12. /**
  13. * @dev Constructor that gives _msgSender() all of existing tokens.
  14. */
  15. constructor () public ERC20Detailed("SimpleToken", "SIM", 18) {
  16. _mint(_msgSender(), 10000 * (10 ** uint256(decimals())));
  17. }
  18. }