Closed odyslam closed 1 year ago
When a user calls purchase, they input the currentPrice. It's cheaper to use the calldata input variable than the storage variable _price throughout the function.
_price
Replace_price with currentPrice
currentPrice
I assume we would use this after checking that the two are equal? If so, agreed.
Description
When a user calls purchase, they input the currentPrice. It's cheaper to use the calldata input variable than the storage variable
_price
throughout the function.Suggestion
Replace
_price
withcurrentPrice