-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QA Report #169
Comments
[L-01] abi.encodePacked() should not be used with dynamic types when passing the result to a hash function such as keccak256()Don't believe any meaningful risk was shown, you'd want to avoid using [N-01] Use at least Solidity 0.8.12 to get string.concat()This would be just syntactic sugar, don't think it's valid [N-02] Unused named returnsThe codebase always returns the named variable explicitly, which is done consistently. Hence the named return is used. [N-03] It's better to emit after all processing is doneGiven the specific context, I assume the code was re-written to avoid false positives from Slither (state change before "external calls". I believe the events are emitted properly, and consistently [N-04] Avoid floating pragmas: the version should be lockedDisagree per discussion on #67 [N-05] Missing NatSpec commentsI don't believe this to be valid, natspec is always optional I think the judges were correct in marking this report invalid |
NatSpec is optional, but if it is added, it's inconsistent to only list some of the params |
@GalloDaSballo and the sponsor ended up making the change: https://github.com/ProjectOpenSea/seaport/blob/3b064ba270760eeda58f60d7d8dc7e14bd39bbaf/contracts/interfaces/ConduitControllerInterface.sol#L162 |
Still disagree but giving a valid NC |
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. |
Table of Contents:
abi.encodePacked()
should not be used with dynamic types when passing the result to a hash function such askeccak256()
0.8.12
to getstring.concat()
[L-01]
abi.encodePacked()
should not be used with dynamic types when passing the result to a hash function such askeccak256()
Same finding from other contests:
Use
abi.encode()
instead which will pad items to 32 bytes, which will prevent hash collisions (e.g.abi.encodePacked(0x123,0x456)
=>0x123456
=>abi.encodePacked(0x1,0x23456)
, butabi.encode(0x123,0x456)
=>0x0...1230...456
). If there is only one argument toabi.encodePacked()
it can often be cast tobytes()
orbytes32()
instead.[N-01] Use at least Solidity
0.8.12
to getstring.concat()
Use a solidity version of at least 0.8.12 to be able to use
string.concat()
instead ofabi.encodePacked()
:Additionally, consider using
string.concat()
instead ofabi.encodePacked()
here:[N-02] Unused named returns
While not consuming more gas with the Optimizer enabled: using both named returns and a return statement isn't necessary. Removing one of those can improve code clarity:
[N-03] It's better to emit after all processing is done
contracts/conduit/ConduitController.sol (1):
contracts/conduit/ConduitController.sol (2):
contracts/conduit/ConduitController.sol (3 & 4):
[N-04] Avoid floating pragmas: the version should be locked
[N-05] Missing NatSpec comments
The following comments are missing (see
@audit
tags):The text was updated successfully, but these errors were encountered: