An array of tokens in BasketFacet::getTokens() is first rewritten to the memory as IERC20[] and then copied again just to change type to address[]. The intermediary state is redundant.
Recommended Mitigation Steps
Consider copying storage data directly to the result array.
Handle
Czar102
Vulnerability details
Optimization
An array of tokens in
BasketFacet::getTokens()
is first rewritten to the memory asIERC20[]
and then copied again just to change type toaddress[]
. The intermediary state is redundant.Recommended Mitigation Steps
Consider copying storage data directly to the
result
array.