NFT Dealers

First Flight #58
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

[G-6] Redundant `isWhitelisted` external function can be removed

Redundant isWhitelisted external function can be removed

Description

The smart contract implements a getter for the whitelisted user but the mapping is already public. Public mappings already implement an accessor function, making the custom function redundant and increasing the deployment gas cost:

@> function isWhitelisted(address _user) external view returns (bool) {
@> return whitelistedUsers[_user];
@> }

Recommended Mitigation

Delete this function:

- function isWhitelisted(address _user) external view returns (bool) {
- return whitelistedUsers[_user];
- }
Updates

Lead Judging Commences

rubik0n Lead Judge 16 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

info

Support

FAQs

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

Give us feedback!