20,000 USDC
View results
Submission Details
Severity: gas
Valid

## [G-15] Public function not called by the contract should be declared external instead

Summary

[G-15] Public function not called by the contract should be declared external instead

Contracts are allowed to override their parents' functions and change the visibility from external to public and can save gas by doing so.

file: /src/Fees.sol
26 function sellProfits(address _profits) public {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Fees.sol#L26

file: /src/Lender.sol
437 function startAuction(uint256[] calldata loanIds) public {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L437

file: /src/Lender.sol
548 function seizeLoan(uint256[] calldata loanIds) public {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L548

file: /src/utils/Ownable.sol
19 function transferOwnership(address _owner) public virtual onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/utils/Ownable.sol#L19

Support

FAQs

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