Several functions in the EggVault contract are declared as public but are not called internally. These functions should be marked as external to reduce gas usage and bytecode size, improving contract efficiency without changing behavior.
In Solidity, public functions are accessible both internally and externally, which causes the compiler to generate both an external and internal function wrapper. When a function is only ever called externally, this extra wrapper is unnecessary.
The following functions in EggVault.sol are only intended to be called by users or other contracts:
Because none of these are called from within the same contract, they can and should be declared external to optimize for gas and bytecode.
Using public generates both internal and external function wrappers.
Slight increase in contract size.
While minor, these changes can slightly reduce deployment and call costs.
Manual code review
Aderyn
Change the following function signatures in EggVault.sol:
Strategy to save gas and minimize transaction costs
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.