QA Report #130
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
QA report
[N-01] Use capital letters for constants and immutables
The convention for constants in Solidity is to use capital letters, see Solidity style guide.
Examples of constants not using this convention can be found in
AuraLocker.sol
L73, L81, L83, L104, L105, L107, L109 and L119.This means that variables like these:
Should be named to:
[N-02] Use time units instead of calculations
The usage of Solidity’s time units can increase the readability of the code. For example in the
AuraLocker.sol
contract at L81-L83:Can be rewritten into:
Which makes it much more clear that
rewardsDuration
is 1 week andlockDuration
is 17 weeks.[N-03] Declaration of functions out of order
In some contracts the order of the methods seems to be more or less random, which makes the contract hard to read through. An example of such contract could be
AuraBalRewardPool.sol
. The Solidity docs have a style guide which gives some good guidelines on the order of which methods should be declared to improve readability, see the style guide.The text was updated successfully, but these errors were encountered: