Incorrect function modifier used leads to wrong data returned. There are other functions with the same root cause of using pure modifier instead of view
this function is marked as pure
, but it's actually reading from and potentially writing to storage. Here are the issues:
pure
Function Modifier: The pure
modifier is used for functions that don't read from or modify the contract's state. However, this function is clearly interacting with storage by setting the slot
of a storage variable.
Storage Access in a Pure Function: The function is returning a storage
reference (Data storage customReferralConfigurationTestnet
), which implies reading from or potentially writing to storage. This operation cannot be performed in a pure
function.
Because the function is marked as pure
, it will compile but won't actually load or return the correct data from storage. Instead, it might return uninitialized or incorrect data.
Manual Review
change the function modifier from pure to view
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.