ERC20Detailed.sol 926 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. }