NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Unused elements of struct Request

Summary

The struct Request in both Solidity and Cairo contracts contains unused elements. Removing these elements can reduce gas costs and simplify the code.

Vulnerability Details

The following array elements are not used in any of the contracts in l1 or l2, consider removing to avoid overhead gas costs.

struct Request {
uint256[] tokenValues; // NOT USED
uint256[] newOwners; // NOT USED
}

in cairo here

## in cairo
values: array![].span(),
new_owners: array![].span(),

Locations:

Impact

The unuse elements does not present a security risk but contributes to unnecessary complexity in the code. Removing unuse element can improve code readability and maintainability.

Tools Used

  • Manual code review

Recommendations

  • Remove the unused elements from the struct.

Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Support

FAQs

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

Give us feedback!