TempleGold::mint
function does not follow CEI which could cost more gas than necessary when it reverts
The TempleGold::mint
function reads the distributionParams
variable from storage before carrying out the check
which does not depend on the distributionParams
variable. Where the condition fails the function reverts, the contract would have paid gas for reading distributionParams
from storage needlessly.
Because the TempleGold::mint
function does not follow CEI, the function will cost more gas than necessary when it reverts.
Manual review
Since the check
does not depend on distributionParams
variable, the section of the TempleGold::mint
function that reads distributionParams
from storage 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.