DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Unused Custom Error in `MultiSig.sol`

Summary

The error NotEnoughApprovals() was declared in the MultiSig.sol contract but was not used anywhere in the contract

Vulnerability Details

error NotEnoughApprovals();

Impact

This creates an extra gas cost

Tools Used

Manual review

Recommendations

Consider using the custom error in the executeTransaction function like below:

function executeTransaction(uint256 _txId) external onlyOwners {
require(_txId < transactions.length, "Invalid transaction ID");
Transaction storage txn = transactions[_txId];
require(!txn.executed, "Transaction already executed");
- require(txn.approvedByOwner1 && txn.approvedByOwner2, "Not enough approvals");
+ require(txn.approvedByOwner1 && txn.approvedByOwner2, NotEnoughApprovals());
Updates

Appeal created

n0kto Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.