We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[G-1]- .LENGTH SHOULD NOT BE LOOKED UP IN EVERY LOOP OF A FOR-LOOP :
The array length used inside a loop for incrementing i must not be looked up in every iteration
File: juice-contracts-v2-code4rena/contracts/JBDirectory.sol
line 167 : for (uint256 _i; _i < _terminalsOf[_projectId].length; _i++)
[G-2]- += COSTS MORE GAS THAN = + FOR STATE VARIABLES :
File: juice-contracts-v2-code4rena/contracts/JBTokenStore.sol
line 409 : unclaimedBalanceOf[_holder][_projectId] = unclaimedBalanceOf[_holder][_projectId] - _amount; line 412 : unclaimedTotalSupplyOf[_projectId] = unclaimedTotalSupplyOf[_projectId] - _amount; line 451 : unclaimedBalanceOf[_recipient][_projectId] = unclaimedBalanceOf[_recipient][_projectId] + _amount;
[G-3]- READING MEMORY VARIABLE INSTEAD OF STATE VARIABLE INSIDE A FOR LOOP :
line 168 : if (_terminalsOf[_projectId][_i] == _terminal) return true;
[G-4]- USE OF ++i COST LESS GAS THAN i++ IN FOR LOOPS :
File: juice-contracts-v2-code4rena/contracts/JBOperatorStore.sol
line 85 : for (uint256 _i = 0; _i < _permissionIndexes.length; _i++);
The text was updated successfully, but these errors were encountered:
Aymen0909 issue #247
8296119
No branches or pull requests
[G-1]- .LENGTH SHOULD NOT BE LOOKED UP IN EVERY LOOP OF A FOR-LOOP :
The array length used inside a loop for incrementing i must not be looked up in every iteration
File: juice-contracts-v2-code4rena/contracts/JBDirectory.sol
line 167 : for (uint256 _i; _i < _terminalsOf[_projectId].length; _i++)
[G-2]- += COSTS MORE GAS THAN = + FOR STATE VARIABLES :
File: juice-contracts-v2-code4rena/contracts/JBTokenStore.sol
line 409 : unclaimedBalanceOf[_holder][_projectId] = unclaimedBalanceOf[_holder][_projectId] - _amount;
line 412 : unclaimedTotalSupplyOf[_projectId] = unclaimedTotalSupplyOf[_projectId] - _amount;
line 451 : unclaimedBalanceOf[_recipient][_projectId] = unclaimedBalanceOf[_recipient][_projectId] + _amount;
[G-3]- READING MEMORY VARIABLE INSTEAD OF STATE VARIABLE INSIDE A FOR LOOP :
File: juice-contracts-v2-code4rena/contracts/JBDirectory.sol
line 168 : if (_terminalsOf[_projectId][_i] == _terminal) return true;
[G-4]- USE OF ++i COST LESS GAS THAN i++ IN FOR LOOPS :
File: juice-contracts-v2-code4rena/contracts/JBDirectory.sol
line 167 : for (uint256 _i; _i < _terminalsOf[_projectId].length; _i++)
File: juice-contracts-v2-code4rena/contracts/JBOperatorStore.sol
line 85 : for (uint256 _i = 0; _i < _permissionIndexes.length; _i++);
The text was updated successfully, but these errors were encountered: