Root Cause: Several functions are marked as public when they are not called internally within the contract. Using public exposes the function to both internal and external calls, whereas external restricts it to external calls only.
Impact: Using public unnecessarily increases the contract's bytecode size and may slightly increase gas costs. It also deviates from Solidity best practices regarding function visibility.
Functions That Can Be Marked as external:
In CharityRegistry:
In GivingThanks:
Issue: These functions are not called internally and can be marked as external to optimize gas usage.
Change Visibility to external:
In CharityRegistry:
In GivingThanks:
Benefits of Using external:
Reduces gas costs when the function is called externally.
Decreases the contract's bytecode size.
Clarifies the intended use of the function.
Note: If a function might be called internally in the future or by inherited contracts, it should remain public.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.