Several functions in the codebase are marked as public but are never called internally. In such cases, the external visibility specifier is more appropriate, as it reduces gas costs slightly when the function is called externally.
In Solidity, public functions can be accessed both internally and externally, while external functions can only be called from outside the contract. If a function is not used internally, using external is a gas optimization.
Found Instances:
• tokenOwner() is not called anywhere within the contract, so it can be safely marked external.
• decimals() is overriding the base ERC20 contract and needs to stay public for compatibility with ERC20 interfaces, so this instance is not actionable and can be ignored.
Low.
Changing public to external can result in minor gas savings when the function is called externally. It also improves clarity by enforcing intended usage boundaries.
Manual Review
Solidity Compiler Warnings
Code suggestions or observations that do not pose a direct security risk.
Code suggestions or observations that do not pose a direct security risk.
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.