BriVault

First Flight #52
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

`getWinner::BriVault` function should be made external

Root + Impact : getWinner::BriVault should be made external from public, making the contract more gas efficient.

Description

  • getWinner::BriVault function is using public visibility specifier but is not used anywhere inside the contract.

  • The function should therefore be using external specifier instead of public.

contract BriVault is ERC4626, Ownable {
...
@> function getWinner() public view returns (string memory) {
...
}
...
}

Risk

Likelihood: Low

Impact: Low/Gas

  • This is a gas Optimization.

Recommended Mitigation

  • It is recommended to change the visibility specifier from public -> external. Hence, optimizing the gas fee.

contract BriVault is ERC4626, Ownable {
...
- function getWinner() public view returns (string memory) {
+ function getWinner() external view returns (string memory) {
...
}
...
}
Updates

Appeal created

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

Gas optimizations

Gas optimizations are invalid according to the CodeHawks documentation.

Support

FAQs

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

Give us feedback!