ERC20Detailed.sol 987 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. pragma solidity ^0.4.24;
  2. import "./IERC20.sol";
  3. /**
  4. * @title ERC20Detailed token
  5. * @dev The decimals are only for visualization purposes.
  6. * All the operations are done using the smallest and indivisible token unit,
  7. * just as on Ethereum all the operations are done in wei.
  8. */
  9. contract ERC20Detailed is IERC20 {
  10. string private _name;
  11. string private _symbol;
  12. uint8 private _decimals;
  13. constructor (string name, string symbol, uint8 decimals) public {
  14. _name = name;
  15. _symbol = symbol;
  16. _decimals = decimals;
  17. }
  18. /**
  19. * @return the name of the token.
  20. */
  21. function name() public view returns (string) {
  22. return _name;
  23. }
  24. /**
  25. * @return the symbol of the token.
  26. */
  27. function symbol() public view returns (string) {
  28. return _symbol;
  29. }
  30. /**
  31. * @return the number of decimals of the token.
  32. */
  33. function decimals() public view returns (uint8) {
  34. return _decimals;
  35. }
  36. }