QA Report #199
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Unused import of OpenZeppelin
String.sol
inPuttyV2Nft.sol
PuttyV2Nft.sol
is importingimport "openzeppelin/utils/Strings.sol";
but is never using that library inside the code.Consider removing it.
PuttyV2Nft.sol
miss natspec documentationNatspec documentation are useful for internal developers that need to work on the project, external developers that need to integrate with the project, auditors that have to review it but also for end users given that Etherscan has officially integrated the support for it directly on their site.
The
PuttyV2Nft
contract is missing natspec documentation for all the function. A well detailed natspec documentation would be important to describe the current implementation difference for_mint
,transferFrom
andbalanceOf
functions.Consider adding natspec documentation to the contract.
Orders should not be cancellable multiple times or after being filled
The
cancelledOrders
mapping state variable is only used byfillOrder
to prevent to fill an already cancelled order.To prevent confusion, the protocol should prevent:
order.maker
to cancel order multiple times and as a result emitting multiple time theCancelledOrder
eventorder.maker
cancel an order after being filled. Even if it does not impact any logic inside the contract, it still could confuse users interacting directly with the contract/websites that use that information or even with monitoring tools that rely on those events/state variablesConsider preventing
order.maker
to call the cancel order if the order had been filled or have been already cancelled.Note: If the protocol implement this solution, they should also consider to "skip" the
cancel
call insideacceptCounterOffer
if theoriginalOrdr
has been cancelled, otherwise theacceptCounterOffer
tx would revert.The text was updated successfully, but these errors were encountered: