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 local variables #195

Open
code423n4 opened this issue Nov 17, 2021 · 2 comments
Open

Unused local variables #195

code423n4 opened this issue Nov 17, 2021 · 2 comments
Assignees
Labels
bug Something isn't working G (Gas Optimization)

Comments

@code423n4
Copy link
Contributor

Handle

ye0lde

Vulnerability details

Impact

Removing the unused local variables improves code clarity.

Proof of Concept

Suggest changing to (uint256[] memory amounts,)
https://github.com/code-423n4/2021-11-nested/blob/f646002b692ca5fa3631acfff87dda897541cf41/contracts/NestedFactory.sol#L379
https://github.com/code-423n4/2021-11-nested/blob/f646002b692ca5fa3631acfff87dda897541cf41/contracts/NestedFactory.sol#L410

Tools Used

Visual Studio Code, Remix

Recommended Mitigation Steps

Remove the unused variables - See POC

@code423n4 code423n4 added 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working labels Nov 17, 2021
code423n4 added a commit that referenced this issue Nov 17, 2021
This was referenced Nov 18, 2021
@adrien-supizet adrien-supizet added the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label Nov 18, 2021
@maximebrugel maximebrugel added the duplicate This issue or pull request already exists label Nov 30, 2021
@maximebrugel
Copy link
Collaborator

Duplicated #67 & #66

@adrien-supizet adrien-supizet removed the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label Dec 2, 2021
@alcueca alcueca reopened this Dec 3, 2021
@alcueca
Copy link
Collaborator

alcueca commented Dec 3, 2021

Taking this as main.

@CloudEllie CloudEllie added G (Gas Optimization) and removed duplicate This issue or pull request already exists 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation labels Dec 3, 2021
@maximebrugel maximebrugel self-assigned this Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working G (Gas Optimization)
Projects
None yet
Development

No branches or pull requests

5 participants