Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused imports #13

Open
code423n4 opened this issue Dec 14, 2021 · 2 comments
Open

Unused imports #13

code423n4 opened this issue Dec 14, 2021 · 2 comments
Labels
bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) G (Gas Optimization) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Handle

robee

Vulnerability details

In the following files there are contract imports that aren't used.
Import of unnecessary files costs deployment gas (and is a bad coding practice that is important to ignore).
The following is a full list of all unused imports, we went through the whole code to find it :) :

    RebalanceManager.sol, line 7, import "@uniswap/v3-periphery/contracts/interfaces/IQuoterV2.sol";
    CallFacet.sol, line 7, import "../shared/Access/CallProtection.sol";
    LibERC20.sol, line 4, import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
    IPangolinRebalanceManager.sol, line 4, import {IPangolinRouter} from "@pangolindex/exchange-contracts/contracts/pangolin-periphery/interfaces/IPangolinRouter.sol";
    IPangolinRebalanceManager.sol, line 5, import "./IExperiPie.sol";
    MintableERC20.sol, line 3, import {ERC20Upgradeable, ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol";
@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Dec 14, 2021
code423n4 added a commit that referenced this issue Dec 14, 2021
@hemulin hemulin added the disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) label Dec 21, 2021
@hemulin
Copy link
Collaborator

hemulin commented Dec 21, 2021

Unused imports are indeed bad practice.
However, they do not have impact on the generated byte code and gas used for deployment.

@ghost ghost added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Dec 30, 2021
@0xleastwood
Copy link
Collaborator

I think they do increase the size of bytecode if I'm not mistaken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) G (Gas Optimization) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

3 participants