TempleGold::mint
function uses storage
instead of memory
which will cost more gas than necessary
The TempleGold::mint
function uses the storage
keyword to read data from the blockchain
and did not cause any changes to the state variable either within that function or in the subsequent function calls with the mint
function.
Because the TempleGold::mint
function uses the storage
keyword to read data from the blockchain without causing any changes to the state variable within that function, it attracts unnecessary gas. It would be cheaper to use the memory
keyword in this scenaro since the function is not causing any state changes to the distributionParams
variable.
Manual review
The section of TempleGold::mint
function that reads the distributionParams
variable from the blockchain can be rearranged as follows
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.