On the Access Control guide for 2.x, the code snippet does not compile.
DetailedERC20 in the constructor should be ERC20Detailed. (Fixed in #1792)minters and namers should be _minters and _namers. (Fixed in #1792)rename function attempts to change name and symbol, but these are private in ERC20Detailed and cannot actually be changed. A different example should be used instead.(reported via Intercom)
Hello,
I see this issue is still open. I'm new to Solidity and would like to contribute.
I propose replacing the rename function with the default burn function in ERC20 and rename _namers with _burners.
Let me know if this is an acceptable solution.
Hi @ristosaar,
Welcome to Solidity. Great that you want to contribute.
Your solution to the code example sounds fine.
Thank you,
I'm not entirely sure how I should incorporate the change though.
docs/modules/ROOT/pages/access-control.adoc seems to be the right file but do I also have to create tests for the new example contract and commit them somewhere? The guidelines are a bit vague on documentation files.
Hello @ristosaar! Indeed, for a change that only affects documentation, just editing the .adoc files is enough. Once the PR is open, you'll see a preview of the generated documentation site, and check that way if your changes are correct.
Most helpful comment
Hello @ristosaar! Indeed, for a change that only affects documentation, just editing the
.adocfiles is enough. Once the PR is open, you'll see a preview of the generated documentation site, and check that way if your changes are correct.