Closed code423n4 closed 2 years ago
Unnecesary cast to uint256
This is just a style preference, changing would not impact the bytecode produced.
Use same style on all loops
Agree, it's a fair point that they could be more consistent internally. Some of the suggested changes here could have minor gas savings as well. But for the most part these suggestions appear to be just minor style preferences.
Add message in test reverts
Revert messages can be helpful, but since these are test files it's not important to the protocol itself.
Casting -> The entire codebase always casts to explicit type, this is a style-convention that is not broken inside the reference and implementation contract (only tests break this), for that reason I don't think the finding is valid
Loops Would be a valid gas report
Revert Test file so agree with out of scope
Agree with the judges decision
The bar for QA reports in this contest is at least 2 valid non-critical findings or at least one valid low risk finding. Per the comments above, this submission is below that bar -- closing as invalid.
QA
Unnecesary cast to uint256
The
CriteriaResolution.sol
lib on line 155 is making an unnecesary cast to uint256;I sugges to simplify it to;
Also on
Executor.sol
lines 283 and 287Consider change;
uint256(1),
to1,
anduint256(0),
to0
Use same style on all loops
In some loops the style is something like;
But in other places this style appears;
It would be nice to mantein the style pattern, for example in
contracts/conduit/Conduit.sol#L65-L77
you could;And also on lines
contracts/conduit/Conduit.sol#L129-L141
On file
contracts/lib/BasicOrderFulfiller.sol#L947-L978
you could wrap the loop in an unchecked block;On file
contracts/lib/OrderCombiner.sol#L620-L651
its also possible to wrap the for loop inside a unchecked block;Add message in test reverts
In EIP1271Wallet.sol, inside test folder, in the
isValidSignature(bytes32,bytes)
the reverts don't have message Add message to help the tester