NestedFactory: in deleteAsset and freeToken, tokens should only be declared once #49
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
PierrickGT
Vulnerability details
Impact
In deleteAsset,
tokens
is declared once in the function and then a second time in the functionfreeToken
.Proof of Concept
The
freeToken
function being used only indeleteAsset
, the code from this function can be moved todeleteAsset
and the function removed. This way, we don't have to passtokens
to thefreeToken
function and we avoid declaring it here a second time.Recommended Mitigation Steps
The following change is recommended.
The text was updated successfully, but these errors were encountered: