Trick or Treat

First Flight #27
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

`public` functions not used internally could be marked `external`

Summary

Instead of marking a function as public, consider marking it as external if it is not used internally.

Vulnerability Details

Found Instances

  • Found in src/TrickOrTreat.sol Line: 43

    function setTreatCost(string memory _treatName, uint256 _cost) public onlyOwner {
  • Found in src/TrickOrTreat.sol Line: 48

    function trickOrTreat(string memory _treatName) public payable nonReentrant {
  • Found in src/TrickOrTreat.sol Line: 118

    function resolveTrick(uint256 tokenId) public payable nonReentrant {
  • Found in src/TrickOrTreat.sol Line: 146

    function withdrawFees() public onlyOwner {
  • Found in src/TrickOrTreat.sol Line: 152

    function getTreats() public view returns (string[] memory) {
  • Found in src/TrickOrTreat.sol Line: 156

    function changeOwner(address _newOwner) public onlyOwner {

Impact

Tools Used

Aderyn,AI

Recommendations

Instead of marking a function as public, consider marking it as external if it is not used internally.

Updates

Appeal created

bube Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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