Improve ERC20.decimals documentation (#3933)

This commit is contained in:
Francisco
2023-01-06 10:09:02 -03:00
committed by GitHub
parent a28aafdc85
commit d59306bd06

View File

@ -18,6 +18,9 @@ import "../../utils/Context.sol";
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
@ -45,9 +48,6 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
@ -77,8 +77,8 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including