Use one require instead of several #96
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Handle
Jujic
Vulnerability details
Impact
You can use in one require several checks to save gas.
Proof of Concept
https://github.com/code-423n4/2021-11-streaming/blob/56d81204a00fc949d29ddd277169690318b36821/Streaming/src/Locke.sol#L585-L592
Tools Used
Recommended Mitigation Steps
require (isSale && !claimedDepositTokens && msg.sender == streamCreator && block.timestamp >= endStream, "claim error");
The text was updated successfully, but these errors were encountered: