Improve ERC20.decimals documentation (#3933)
This commit is contained in:
@ -18,6 +18,9 @@ import "../../utils/Context.sol";
|
|||||||
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
|
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
|
||||||
* to implement supply mechanisms].
|
* 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
|
* We have followed general OpenZeppelin Contracts guidelines: functions revert
|
||||||
* instead returning `false` on failure. This behavior is nonetheless
|
* instead returning `false` on failure. This behavior is nonetheless
|
||||||
* conventional and does not conflict with the expectations of ERC20
|
* 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}.
|
* @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
|
* All two of these values are immutable: they can only be set once during
|
||||||
* construction.
|
* construction.
|
||||||
*/
|
*/
|
||||||
@ -77,8 +77,8 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
|
|||||||
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
|
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
|
||||||
*
|
*
|
||||||
* Tokens usually opt for a value of 18, imitating the relationship between
|
* 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
|
* Ether and Wei. This is the default value returned by this function, unless
|
||||||
* overridden;
|
* it's overridden.
|
||||||
*
|
*
|
||||||
* NOTE: This information is only used for _display_ purposes: it in
|
* NOTE: This information is only used for _display_ purposes: it in
|
||||||
* no way affects any of the arithmetic of the contract, including
|
* no way affects any of the arithmetic of the contract, including
|
||||||
|
|||||||
Reference in New Issue
Block a user