Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERC20.sol "decimals" variable description left in comments from prev versions #3155

Closed
ivan-kyu opened this issue Feb 1, 2022 · 2 comments · Fixed by #3933
Closed

ERC20.sol "decimals" variable description left in comments from prev versions #3155

ivan-kyu opened this issue Feb 1, 2022 · 2 comments · Fixed by #3933
Labels
documentation Inline comments, guides, and examples. good first issue Low hanging fruit for new contributors to get involved!

Comments

@ivan-kyu
Copy link

ivan-kyu commented Feb 1, 2022

The decimals variable comment is left from previous versions:
image

💻 Environment

📝 Details

🔢 Code to reproduce bug

@ivan-kyu ivan-kyu changed the title "Decimals" variable describeden ERC20.sol "decimals" variable description left in comments from prev versions Feb 1, 2022
@Amxx
Copy link
Collaborator

Amxx commented Feb 1, 2022

Hello @ivan-kyuchukov

That is not a mistake.

This contract include a decimal function.

    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

If someone wants to change the decimal, the process is to override the decimals() function. We left a comment here, because devs coming from a 3.x version would be looking to customize that in the constructor → this message tells them that the upgrade is done elsewhere.

@frangio
Copy link
Contributor

frangio commented Feb 2, 2022

Maybe the documentation is confusing because it's in the constructor. We could move the part about decimals to the contract-level docs.

@JulissaDantes JulissaDantes added good first issue Low hanging fruit for new contributors to get involved! documentation Inline comments, guides, and examples. labels Dec 9, 2022
@Amxx Amxx closed this as completed in #3933 Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Inline comments, guides, and examples. good first issue Low hanging fruit for new contributors to get involved!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants