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

Gas Optimizations #281

Open
code423n4 opened this issue May 8, 2022 · 1 comment
Open

Gas Optimizations #281

code423n4 opened this issue May 8, 2022 · 1 comment
Labels
bug Something isn't working G (Gas Optimization)

Comments

@code423n4
Copy link
Contributor

Gas

I. Cache numTrees in a local variable and use in LoC mentioned below:

MerkleDropFactory.sol

https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/MerkleDropFactory.sol#L51

https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/MerkleDropFactory.sol#L59

https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/MerkleDropFactory.sol#L61

MerkleVesting.sol

https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/MerkleVesting.sol#L64

https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/MerkleVesting.sol#L71-L72

https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/MerkleResistor.sol#L86

https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/MerkleResistor.sol#L99-L100

II. Cache in a local variable and use ++

https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/VoterID.sol#L130

https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/MerkleEligibility.sol#L47

https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/MerkleEligibility.sol#L91

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels May 8, 2022
code423n4 added a commit that referenced this issue May 8, 2022
@illuzen
Copy link
Collaborator

illuzen commented May 12, 2022

all duplicates

@illuzen illuzen closed this as completed May 12, 2022
@itsmetechjay itsmetechjay reopened this May 12, 2022
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

3 participants