Files
openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol
Leo Arias 7bb87237f3 Improve encapsulation on ERCs (#1270)
* Improve encapsulation on ERC165

* Improve encapsulation on ERC20

* Improve encapsulation on ERC721

* Add tests, use standard getters

* fix tests

* Fix lint

* move interface ids to implementation contracts

* Do not prefix getters
2018-09-05 17:37:29 -03:00

44 lines
926 B
Solidity

pragma solidity ^0.4.24;
import "./IERC20.sol";
/**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/
contract ERC20Detailed is IERC20 {
string private name_;
string private symbol_;
uint8 private decimals_;
constructor(string _name, string _symbol, uint8 _decimals) public {
name_ = _name;
symbol_ = _symbol;
decimals_ = _decimals;
}
/**
* @return the name of the token.
*/
function name() public view returns(string) {
return name_;
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns(string) {
return symbol_;
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns(uint8) {
return decimals_;
}
}