// Copy the bytecode (our initialise part is 13 bytes long)
Change initialise to initialize. The spelling of a given word should be consistent. Most of the contest uses the American English spelling of initialize. For example, JBTiered721DelegateDeployer.sol: L84. The following six additional instances of initialise also should be corrected:
JBOperatable: Several functions in this contract can only be accessed by a project owner, or an address that has been preconfifigured to be an operator of the project.
Delegate that offers project contributors NFTs with tiered price floors upon payment and the ability to redeem NFTs for treasury assets based based on price floor.
Remove repeated word based
The same typo (accross) occurs in both lines below:
// Keep a reference to the flag indicating if the transaction should revert if all provded funds aren't spent. Defaults to false, meaning only a minimum payment is enforced.
In theory, comments over 80 characters should wrap using multi-line comment syntax. Even if somewhat longer comments (up to 120 characters) are acceptable and a scroll bar is provided, there are cases where very long comments interfere with readability. Below are five instances of extra-long comments whose readability could be improved by wrapping, as shown:
IJBTiered721DelegateDeployer: General interface for the generic controller methods in this contract that interacts with funding cycles and tokens according to the protocol's rules.
Suggestion:
IJBTiered721DelegateDeployer: General interface for the generic controller methods in this contract
that interacts with funding cycles and tokens according to the protocol's rules.
Transfers, mints, or burns tier voting units. To register a mint, `from` should be zero. To register a burn, `to` should be zero. Total supply of voting units will be adjusted with mints and burns.
Suggestion:
Transfers, mints, or burns tier voting units. To register a mint, `from` should be zero.
To register a burn, `to` should be zero. Total supply of voting units will be adjusted with mints and burns.
@param _pricing The tier pricing according to which token distribution will be made. Must be passed in order of contribution floor, with implied increasing value.
Suggestion:
@param _pricing The tier pricing according to which token distribution will be made.
Must be passed in order of contribution floor, with implied increasing value.
// Keep a reference to the flag indicating if the transaction should revert if all provded funds aren't spent. Defaults to false, meaning only a minimum payment is enforced.
Suggestion:
// Keep a reference to the flag indicating if the transaction should revert if all provided funds aren't spent.
// Defaults to false, meaning only a minimum payment is enforced.
// Shift the length to the length placeholder, in the constructor
let _mask := mul(_codeSize, 0x100000000000000000000000000000000000000000000000000000000)
Missing require revert string
An error message should be included to enable users to understand the reason for failure.
Recommendation: Add a brief (<= 32 char) explanatory message to both of the requires referenced below. Or use custom error codes (which would be cheaper than revert strings).
Use consistent initialization of counters in for loops
Most for loop counters in Juicebox are not initiated to zero whereas a few are. It is not necessary to initialize for loop counters to zero since this is their default value.
For consistency, it makes sense to omit counter initializations in the for loops below.
QA Report low
Missing checks for address(0x0) when assigning values to address state variables
Checks are missing for all three variables below:
JBTiered721DelegateDeployer.sol: L51-53
QA Report: non-critical
Typos
JBTiered721DelegateDeployer.sol: L132
Change
initialise
toinitialize
. The spelling of a given word should be consistent. Most of the contest uses the American English spelling ofinitialize
. For example, JBTiered721DelegateDeployer.sol: L84. The following six additional instances ofinitialise
also should be corrected:JBTiered721DelegateStore.sol: L233
JBTiered721DelegateStore.sol: L716
JBTiered721DelegateStore.sol: L947
JBTiered721DelegateStore.sol: L1032
JBTiered721DelegateStore.sol: L1183
JBBitmap.sol: L13
JBTiered721DelegateProjectDeployer.sol: L19
Change
preconfifigured
topreconfigured
JBTiered721DelegateProjectDeployer.sol: L34
Change
responsibile
toresponsible
JBTiered721Delegate.sol: L17
Remove repeated word
based
The same typo (
accross
) occurs in both lines below:JBTiered721Delegate.sol: L121
JBTiered721DelegateStore.sol: L497
Change
accross
toacross
in both casesThe same typo (
adherance
) occurs in both lines below:JBTiered721Delegate.sol: L173
JB721Delegate.sol: L176
Change
adherance
toadherence
in both casesJBTiered721Delegate.sol: L268
Change
reserved
toreserves
The same typo (
beneificiary
) occurs in both lines below:JBTiered721Delegate.sol: L363
JBTiered721Delegate.sol: L368
Change
beneificiary
tobeneficiary
in both casesJBTiered721Delegate.sol: L545
Change
provded
toprovided
JBTiered721Delegate.sol: L557
Remove repeated word
the
JBTiered721Delegate.sol: L717
Change
User
toUse
andregitered
toregistered
JBTiered721DelegateStore.sol: L176
Change
superceeds
tosupersedes
JBTiered721DelegateStore.sol: L230
Change
referecen
toreference
JBTiered721DelegateStore.sol: L597
Change
benficiary
tobeneficiary
JBTiered721DelegateStore.sol: L719
Change
idex
toindex
JBTiered721DelegateStore.sol: L832
Change
of burned
toburned
JBTiered721DelegateStore.sol: L852
Change
reservd
toreserved
JB721Delegate.sol: L88
Change
recieved
toreceived
JB721Delegate.sol: L144
Change
operation
tooperations
JBIpfsDecoder.sol: L42
Change
Licence
toLicense
NatSpec statements are missing
NatSpec statements are entirely missing for the two
constructors
referenced below:JBTiered721DelegateDeployer.sol: L46-54
JBTiered721Delegate.sol: L185-187
NatSpec statements are also entirely missing for the four
functions
below:JBTiered721DelegateDeployer.sol: L115-118
JBTiered721FundingCycleMetadataResolver.sol: L6-9
JBTiered721FundingCycleMetadataResolver.sol: L11-13
JBTiered721FundingCycleMetadataResolver.sol: L15-17
NatSpec is incomplete
The following
functions
are missing@return
:JB721TieredGovernance.sol: L68-81
JB721TieredGovernance.sol: L84-92
JB721TieredGovernance.sol: L95-108
JB721TieredGovernance.sol: L111-118
JB721TieredGovernance.sol: L121-135
JBTiered721Delegate.sol: L167-179
JB721Delegate.sol: L170-191
Long single-line comments
In theory, comments over 80 characters should wrap using multi-line comment syntax. Even if somewhat longer comments (up to 120 characters) are acceptable and a scroll bar is provided, there are cases where very long comments interfere with readability. Below are five instances of extra-long comments whose readability could be improved by wrapping, as shown:
JBTiered721DelegateDeployer.sol: L15
Suggestion:
Similarly for the following equivalent comment: JBTiered721DelegateProjectDeployer.sol: L15
JB721TieredGovernance.sol: L235
Suggestion:
JBTiered721Delegate.sol: L198
Suggestion:
JBTiered721Delegate.sol: L545
Suggestion:
JB721Delegate.sol: L144
Suggestion:
Open items
Comments that contain language referring to possible open items should be addressed and modified or removed
JBTiered721DelegateProjectDeployer.sol: L75
While it might just be an example of awkward language, the phrase "optimistically knowing" appears ambiguous and should be reviewed and corrected
Use scientific notation for large multiples of 10 rather than decimal literals
For readability, used scientific notation (e.g. 1e6) rather than decimal literals (e.g. 1000000) for large multiples of ten
JBTiered721DelegateDeployer.sol: L123-124
Missing
require
revert stringAn error message should be included to enable users to understand the reason for failure.
Recommendation: Add a brief (<= 32 char) explanatory message to both of the
requires
referenced below. Or use custom error codes (which would be cheaper than revert strings).JBTiered721Delegate.sol: L216
JBTiered721Delegate.sol: L218
Use consistent initialization of counters in
for
loopsMost
for
loop counters inJuicebox
are not initiated to zero whereas a few are. It is not necessary to initializefor
loop counters to zero since this is their default value.For consistency, it makes sense to omit counter initializations in the
for
loops below.JBIpfsDecoder.sol: L49-62
JBIpfsDecoder.sol: L68-70
JBIpfsDecoder.sol: L76-78
JBIpfsDecoder.sol: L84-86