The RapBattle::_battle
function includes an unnecessary reset of the totalPrize memory variable to 0, which does not affect gas usage or functionality, indicating a potential misunderstanding of memory variables' impact.
Within the RapBattle::_battle
function, after calculating and distributing prizes based on NFT battle outcomes, the `totalPrize`` memory variable is reset to 0. This operation is redundant because memory variables are temporary and do not influence gas costs or the contract's state post-execution.
LOW or INFORMATIONAL
Manual review
Remove the line resetting totalPrize to 0 to simplify the code without impacting functionality.
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.