Hawk High

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

[I-4] Public Function Not Used Internally

Summary

Most functions in LevelOne.solare defined as public, but since they are not internally used, it's a bad practice to have them be public.

Tools Used

  • Slither

  • Aderyn

Recommendations

If a function is marked public but is not used internally, consider marking it as external.

<details>

<summary>Found instances</summary>

  • Found in src/LevelOne.sol Line: 201

    function addTeacher(address _teacher) public onlyPrincipal notYetInSession {
  • Found in src/LevelOne.sol Line: 220

    function removeTeacher(address _teacher) public onlyPrincipal {
  • Found in src/LevelOne.sol Line: 243

    function expel(address _student) public onlyPrincipal {
  • Found in src/LevelOne.sol Line: 269

    function startSession(uint256 _cutOffScore) public onlyPrincipal notYetInSession {
  • Found in src/LevelOne.sol Line: 277

    function giveReview(address _student, bool review) public onlyTeacher {
  • Found in src/LevelOne.sol Line: 295

    function graduateAndUpgrade(address _levelTwo, bytes memory) public onlyPrincipal {
  • Found in src/LevelTwo.sol Line: 28

    function graduate() public reinitializer(2) {}

</details>

Updates

Lead Judging Commences

yeahchibyke Lead Judge 6 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.