Omniscia Native Audit
PoolDeployer Static Analysis Findings
PoolDeployer Static Analysis Findings
PDR-01S: Data Location Optimizations
Type | Severity | Location |
---|---|---|
Gas Optimization | PoolDeployer.sol:L14-L17 |
Description:
The linked input arguments are set as memory
in external
function(s).
Example:
contracts/libraries/PoolDeployer.sol
9function deploy(10 address treasuryAddress,11 address poolOwnerAddress,12 address signerAddress,13 address pricingModelRegistry,14 uint256[] memory fees,15 address[] memory tokenAs,16 address[] memory tokenBs,17 uint256[] memory pricingModelIds18) public returns (IPool pool) {
Recommendation:
We advise them to be set as calldata
optimizing their read-access gas cost.
Alleviation:
All referenced data location specifiers have been properly adjusted from memory
to calldata
, optimizing each variable's read-access gas cost.