-
Notifications
You must be signed in to change notification settings - Fork 1
Description
If you want to use this contract to publish EIP, then better to follow good code practice.
- Follow Style Guide.
https://docs.soliditylang.org/en/v0.8.23/style-guide.html
- Missing docstrings.
The contracts in the code base lack documentation. This hinders reviewers’ understanding of the code’s intention, which is fundamental to correctly assess not only security but also correctness. Additionally, docstrings improve readability and ease maintenance. They should explicitly explain the purpose or intention of the functions, the scenarios under which they can fail, the roles allowed to call them, the values returned, and the events emitted.
Consider thoroughly documenting all functions (and their parameters) that are part of the contracts’ public API. Functions implementing sensitive functionality, even if not public, should be documented as well. When writing docstrings, consider following the Ethereum Natural Specification Format (NatSpec).
https://docs.soliditylang.org/en/v0.8.23/natspec-format.html
- Functions not used internally could be marked as external.
It's a good coding practice to mark a function external when it's not called within the contract but only from outside the contract.