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
Since _verifyTime requires startTime <= endTime it may be worth using unchecked here for a small savings. Same for the others so long as it is confirmed that the appropriate checks have already been peformed.
Cache advancedOrder.parameters.endTime in a local variable
Since the endTime does not appear to be read a second time here, it's not clear this change would offer any benefit.
Variables are their default types
The compiler seems to mostly handle this automatically. In my testing, not setting defaults offered very little savings.
Utilise uncheck block for gas savings
End should be greater than start time
so use unchecked block to save gas
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/lib/OrderFulfiller.sol#L163
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/lib/OrderCombiner.sol#L235
https://github.com/code-423n4/2022-05-opensea-seaport/blob/9d7ce4d08bf3c3010304a0476a785c70c0e90ae7/reference/lib/ReferenceOrderCombiner.sol#L241
If statement ensures no underflow :
https://github.com/code-423n4/2022-05-opensea-seaport/blob/9d7ce4d08bf3c3010304a0476a785c70c0e90ae7/contracts/lib/FulfillmentApplier.sol#L100
https://github.com/code-423n4/2022-05-opensea-seaport/blob/9d7ce4d08bf3c3010304a0476a785c70c0e90ae7/contracts/lib/FulfillmentApplier.sol#L112
https://github.com/code-423n4/2022-05-opensea-seaport/blob/9d7ce4d08bf3c3010304a0476a785c70c0e90ae7/reference/lib/ReferenceBasicOrderFulfiller.sol#L867
https://github.com/code-423n4/2022-05-opensea-seaport/blob/9d7ce4d08bf3c3010304a0476a785c70c0e90ae7/reference/lib/ReferenceFulfillmentApplier.sol#L109
https://github.com/code-423n4/2022-05-opensea-seaport/blob/9d7ce4d08bf3c3010304a0476a785c70c0e90ae7/reference/lib/ReferenceFulfillmentApplier.sol#L120
Cache advancedOrder.parameters.endTime in a local variable
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/lib/OrderCombiner.sol#L235
https://github.com/code-423n4/2022-05-opensea-seaport/blob/9d7ce4d08bf3c3010304a0476a785c70c0e90ae7/reference/lib/ReferenceOrderCombiner.sol#L241
Variables are their default types
No need to assign them :
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/lib/OrderCombiner.sol#L470
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/lib/OrderCombiner.sol#L751
https://github.com/code-423n4/2022-05-opensea-seaport/blob/9d7ce4d08bf3c3010304a0476a785c70c0e90ae7/reference/lib/ReferenceAmountDeriver.sol#L46
The text was updated successfully, but these errors were encountered: