You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Non-strict inequalities are cheaper than strict ones
AuraLocker.sol#L724
AuraVestedEscrow.sol#L158 (when _time = startTime, the final result will be 0 anyway)
Check require() at the beginning of function
AuraBalRewardPool.sol#L77
AuraLocker.sol#L385 (You can move this line to #L381 so that you can avoid unnecessary calculation for expiryTime)
AuraMerkleDrop.sol#L69
AuraMerkleDrop.sol#L152
AuraPenaltyForwarder.sol#L51-L52 (You can move these lines to #L49)
AuraVestedEscrow.sol#L63-L66 (You can move these lines to #L58)
Declare memory variable instead of calling locks[i] several times
AuraLocker.sol#L696-L707
Change storage to memory if possible
AuraLocker.sol#L172
AuraLocker.sol#L377
AuraLocker.sol#L469
AuraLocker.sol#L659
AuraLocker.sol#L692
AuraLocker.sol#L693
Booster.sol#L399
Booster.sol#L454
Booster.sol#L573
ConvexMasterChef.sol#L157
ConvexMasterChef.sol#L158
ConvexMasterChef.sol#L263
Don't use storage value if possible
AuraVestedEscrow.sol#L65 (You can use starttime_, endtime_ instead of startTime, endTime)
Use != 0 instead of > 0 for uint variables
There are more than 30 cases and I will show just one example.
I think you can change them easily if you want.
Aura.sol#L68
Use ++i instead of i++, i+=1 (also for --i)
There are more than 30 cases and I will show just one example.
Also you can use "unchecked" for such increments.
AuraClaimZap.sol#L143
No need to initialize variables with default values
There are more than 30 cases and I will show just one example for uint and all for bool.
AuraBalRewardPool.sol#L35
AuraLocker.sol#L114
AuraVestedEscrow.sol#L33
An array’s length should be cached to save gas in for-loops
AuraClaimZap.sol#L143
AuraClaimZap.sol#L147
AuraClaimZap.sol#L151
AuraLocker.sol#L696
AuraLocker.sol#L699
AuraVestedEscrow.sol#L100
ArbitartorVault.sol#L49
BaseRewardPool.sol#L214
BaseRewardPool.sol#L230
BaseRewardPool.sol#L262
BaseRewardPool.sol#L296
Booster.sol#L379
Booster.sol#L538
PoolManagerSecondaryProxy.sol#L69
Use if(flag) instead of if(flag == true) [use if(!flag) instead of if(flag == false)]
RewardFactory.sol#L72
VoterProxy.sol#L107
VoterProxy.sol#L168
VoterProxy.sol#L171
VoterProxy.sol#L190
AuraMerkleDrop.sol#L123
Booster.sol#L400
Booster.sol#L574
The text was updated successfully, but these errors were encountered:
Non-strict inequalities are cheaper than strict ones
AuraLocker.sol#L724
AuraVestedEscrow.sol#L158 (when _time = startTime, the final result will be 0 anyway)
Check require() at the beginning of function
AuraBalRewardPool.sol#L77
AuraLocker.sol#L385 (You can move this line to #L381 so that you can avoid unnecessary calculation for expiryTime)
AuraMerkleDrop.sol#L69
AuraMerkleDrop.sol#L152
AuraPenaltyForwarder.sol#L51-L52 (You can move these lines to #L49)
AuraVestedEscrow.sol#L63-L66 (You can move these lines to #L58)
Declare memory variable instead of calling locks[i] several times
AuraLocker.sol#L696-L707
Change storage to memory if possible
AuraLocker.sol#L172
AuraLocker.sol#L377
AuraLocker.sol#L469
AuraLocker.sol#L659
AuraLocker.sol#L692
AuraLocker.sol#L693
Booster.sol#L399
Booster.sol#L454
Booster.sol#L573
ConvexMasterChef.sol#L157
ConvexMasterChef.sol#L158
ConvexMasterChef.sol#L263
Don't use storage value if possible
AuraVestedEscrow.sol#L65 (You can use starttime_, endtime_ instead of startTime, endTime)
Use != 0 instead of > 0 for uint variables
There are more than 30 cases and I will show just one example.
I think you can change them easily if you want.
Aura.sol#L68
Use ++i instead of i++, i+=1 (also for --i)
There are more than 30 cases and I will show just one example.
Also you can use "unchecked" for such increments.
AuraClaimZap.sol#L143
No need to initialize variables with default values
There are more than 30 cases and I will show just one example for uint and all for bool.
AuraBalRewardPool.sol#L35
AuraLocker.sol#L114
AuraVestedEscrow.sol#L33
An array’s length should be cached to save gas in for-loops
AuraClaimZap.sol#L143
AuraClaimZap.sol#L147
AuraClaimZap.sol#L151
AuraLocker.sol#L696
AuraLocker.sol#L699
AuraVestedEscrow.sol#L100
ArbitartorVault.sol#L49
BaseRewardPool.sol#L214
BaseRewardPool.sol#L230
BaseRewardPool.sol#L262
BaseRewardPool.sol#L296
Booster.sol#L379
Booster.sol#L538
PoolManagerSecondaryProxy.sol#L69
Use if(flag) instead of if(flag == true) [use if(!flag) instead of if(flag == false)]
RewardFactory.sol#L72
VoterProxy.sol#L107
VoterProxy.sol#L168
VoterProxy.sol#L171
VoterProxy.sol#L190
AuraMerkleDrop.sol#L123
Booster.sol#L400
Booster.sol#L574
The text was updated successfully, but these errors were encountered: