[audit] #2: Typos, comments, unused imports #49
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From Spearbit:
Description / Recommendation
Constants.sol#L4: it should be The node hash of "eth". The
.
beforeeth
is extraConstants.sol#L8: it should be The node hash of "reverse". The
.
beforereverse
is extraSimple Python program to check the correctness of node hashes:
Constants.sol#L15: It would be best to represent BASE_ETH_NAME as hex"04_62617365_03_657468_00" with the underscores as the dnsName encoding follows the following pattern:
len(w0) | hex(w0) | len(w1) | hex(w1) | ... | len(wN) | hex(wN) | 00
and dnsEncodeName only works for words of the form
w0
.w1
.EDAPrice.sol#L4, ExponentialPremiumPriceOracle.sol#L8: The following imports should be removed:
ExponentialPremiumPriceOracle.sol#L13:
PRECISION
is unused.BaseRegistrar.sol#L369: misleading comment about taking grace period into consideration should be removed
DeployRegistrarController.s.sol#L16: typo, it should be
DeployRegistrarController
DeployTestnetDiscountValidator.s.sol#L7: typo, it should be
DeployTestnetDiscountValidator