Change authorised to authorized. Similarly for other forms of the word. This assumes that a decision has been made to use standard American English throughout ENS.
/* This contract is a variation on ERC1155 with the additions of _setData, getData and _canTransfer and ownerOf. _setData and getData allows the use of the other 96 bits next to the address of the owner for extra data. We use this to store 'fuses' that control permissions that can be burnt. 32 bits are used for the fuses themselves and 64 bits are used for the expiry of the name. When a name has expired, its fuses will be be set back to 0 */
/* This contract is a variation on ERC1155 with the additions of _setData, getData and _canTransfer and ownerOf. _setData and getData allows the use of the other 96 bits next to the address of the owner for extra data. We use this to store 'fuses' that control permissions that can be burnt. 32 bits are used for the fuses themselves and 64 bits are used for the expiry of the name. When a name has expired, its fuses will be be set back to 0 */
Comments concerning unfinished work or open items
Comments such as the one below that contain TODOs or similar language should be addressed and modified or removed
* @param name The name of the RRSIG record, in DNS label-sequence format.
* @param data The original data to verify.
* @param proof A DS or DNSKEY record that's already verified by the oracle.
*/
function verifySignature(bytes memory name, RRUtils.SignedSet memory rrset, RRSetWithSignature memory data, bytes memory proof) internal view {
* @param dnskey The dns key record to verify the signature with.
* @param rrset The signed RRSET being verified.
* @param data The original data `rrset` was decoded from.
* @return True iff the key verifies the signature.
*/
function verifySignatureWithKey(RRUtils.DNSKEY memory dnskey, bytes memory keyrdata, RRUtils.SignedSet memory rrset, RRSetWithSignature memory data)
internal
view
returns (bool)
{
// TODO: Check key isn't expired, unless updating key itself
@param statement is missing for keyrdata. I've included the "TODO" comment here (which I mentioned earlier) which refers to the key
* @param addr The reverse record to set
* @param owner The address to set as the owner of the reverse record in ENS.
* @return The ENS node hash of the reverse record.
*/
function claimForAddr(
address addr,
address owner,
address resolver
@param missing for resolver. The resolver@param is also missing in the two examples below:
* @param addr The reverse record to set
* @param owner The owner of the reverse node
* @param name The name to set for this address.
* @return The ENS node hash of the reverse record.
*/
function setNameForAddr(
address addr,
address owner,
address resolver,
string memory name
* @param label Label as a string of the .eth name to upgrade
* @param wrappedOwner The owner of the wrapped name
*/
function upgradeETH2LD(
string calldata label,
address wrappedOwner,
address resolver
* @param tokenId The hash of the label to register (eg, `keccak256('foo')`, for 'foo.eth').
* @param duration The number of seconds to renew the name for.
* @return expires The expiry date of the name on the .eth registrar, in seconds since the Unix epoch.
*/
function renew(
uint256 tokenId,
uint256 duration,
uint64 expiry
@param missing for expiry
Missing require revert string
A require message should be included to enable users to understand reason for failure
Recommendation: Add a brief (<= 32 char) explanatory message to each of the lines below
Typos
DNSSECImpl.sol: L105
Change
canonicalised
tocanonicalized
The same typo (
Authorises
/Authorizes
,Authorised
/authorised
, orUnauthorized
/unauthorised
) occurs in all 20 lines referenced below.Example: ReverseRegistrar.sol: L40:
IBaseRegistrar.sol: L20
ReverseRegistrar.sol: L40
ReverseRegistrar.sol: L46
ReverseRegistrar.sol: L80
ReverseRegistrar.sol: L126
NameWrapper.sol: L15
NameWrapper.sol: L152
NameWrapper.sol: L202
NameWrapper.sol: L224
NameWrapper.sol: L241
NameWrapper.sol: L266
NameWrapper.sol: L289
NameWrapper.sol: L315
NameWrapper.sol: L329
NameWrapper.sol: L350
NameWrapper.sol: L381
NameWrapper.sol: L421
NameWrapper.sol: L469
NameWrapper.sol: L475
NameWrapper.sol: L804
Change
authorised
toauthorized
. Similarly for other forms of the word. This assumes that a decision has been made to use standard American English throughout ENS.ETHRegistrarController.sol: L257
Change
check first
tocheck that first
ReverseRegistrar.sol: L156
Change
optimised
tooptimized
ERC1155Fuse.sol: L10
Remove duplicate word
be
NameWrapper.sol: L534
Change
regsitry
toregistry
Long single line comment
For the sake of readability, comments over 79 characters, such as the one below, should wrap using multi-line comment syntax.
ERC1155Fuse.sol: L10
Comments concerning unfinished work or open items
Comments such as the one below that contain TODOs or similar language should be addressed and modified or removed
DNSSECImpl.sol: L238
Named
return
variable not used when a function returnsThe existence of a named return variable that is never used (here,
newFuses
) is potentially perplexingINameWrapper.sol: L80-82
Missing
@param
statementsDNSSECImpl.sol: L179-183
@param
statement is missing forrrset
DNSSECImpl.sol: L228-238
@param
statement is missing forkeyrdata
. I've included the "TODO" comment here (which I mentioned earlier) which refers to the keyReverseRegistrar.sol: L72-79
@param
missing forresolver
. Theresolver
@param
is also missing in the two examples below:ReverseRegistrar.sol: L127-136
NameWrapper.sol: L397-404
NameWrapper.sol: L267-274
@param
missing forexpiry
Missing
require
revert stringA
require
message should be included to enable users to understand reason for failure Recommendation: Add a brief (<= 32 char) explanatory message to each of the lines belowBytesUtils.sol: L12
BytesUtils.sol: L146
BytesUtils.sol: L159
BytesUtils.sol: L172
BytesUtils.sol: L185
BytesUtils.sol: L199
BytesUtils.sol: L200
BytesUtils.sol: L235
BytesUtils.sol: L262
BytesUtils.sol: L268
BytesUtils.sol: L270
Owned.sol: L10
ETHRegistrarController.sol: L57
ETHRegistrarController.sol: L121
ETHRegistrarController.sol: L246
BytesUtil.sol: L13