Skip to content

Commit

Permalink
Improve ERC20.decimals documentation (#3933)
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Jan 6, 2023
1 parent a28aafd commit d59306b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/token/ERC20/ERC20.sol
Expand Up @@ -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
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d59306b

Please sign in to comment.