public
functions in Basket
can be external
#13
Labels
bug
Warden finding
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
pants
Vulnerability details
The
public
functionsBasket.mint()
,Basket.burn()
,Basket.changePublisher()
,Basket.changeLicenseFee()
,Basket.publishNewIndex()
andBasket.deleteNewIndex()
are never called byBasket
. Therefore, their visibility can be reduced toexternal
.Impact
external
functions are cheaper thanpublic
functions.Proof of Concept
https://gus-tavo-guim.medium.com/public-vs-external-functions-in-solidity-b46bcf0ba3ac
Tool Used
Manual code review.
Recommended Mitigation Steps
Define these functions as
public
.The text was updated successfully, but these errors were encountered: