Closed tomwade closed 1 year ago
The referenced statements make use of the this specifier to invoke the UniswapV3Strategy::validTokens function improperly.
this
UniswapV3Strategy::validTokens
tokens_ = this.validTokens();
We advise the code to directly invoke the UniswapV3Strategy::validTokens (by specifying it as public instead of external) function, significantly optimizing the gas cost of UniswapV3Strategy::_withdraw and UniswapV3Strategy::available invocations.
public
external
UniswapV3Strategy::_withdraw
UniswapV3Strategy::available
UVS-01C: Redundant External Self-Calls
Description:
The referenced statements make use of the
this
specifier to invoke theUniswapV3Strategy::validTokens
function improperly.Example:
Recommendation:
We advise the code to directly invoke the
UniswapV3Strategy::validTokens
(by specifying it aspublic
instead ofexternal
) function, significantly optimizing the gas cost ofUniswapV3Strategy::_withdraw
andUniswapV3Strategy::available
invocations.