Open code423n4 opened 2 years ago
object++ cost more then ++object . (same for --)
object
object+ 1 cost more then ++object .
The default value of uint is 0. So there is no need to set false at index variable. uint256 index = 0 cost more then uint256 index.
index
line 44 - uint256 extraCeiling = 0;
fix - uint256 extraCeiling;
line 948,1040 - for (uint256 i = 0; i < totalAdditionalRecipients; )
fix - for (uint256 i; i < totalAdditionalRecipients; )
line 56,166,184,199 - for (uint256 i = 0; i < totalCriteriaResolvers; ++i)
fix - for (uint256 i; i < totalCriteriaResolvers; ++i)
line 229 - maximumFulfilled--;
fix - --maximumFulfilled;
line 181,373,473,498,577,621,754 - for (uint256 i = 0; i < totalOrders; ++i)
fix - for (uint256 i; i < totalOrders; ++i)
line 247,291,598 - for (uint256 j = 0; j < offer.length; ++j)
line 470,751 - uint256 totalFilteredExecutions = 0;
fix - uint256 totalFilteredExecutions;
fix - for (uint256 j; j < offer.length; ++j)
line 490 - totalFilteredExecutions += 1;
fix - ++totalFilteredExecutions;
line 515 - totalFilteredExecutions += 1;
line 768 - totalFilteredExecutions += 1;
line 217,306,471 - for (uint256 i = 0; i < orderParameters.offer.length; )
fix - for (uint256 i; i < orderParameters.offer.length; )
line 272,350 - for (uint256 i = 0; i < totalOrders; )
fix - for (uint256 i; i < totalOrders; )
gas opt
object
++ cost more then ++object
. (same for --)object
+ 1 cost more then ++object
.The default value of uint is 0. So there is no need to set false at
index
variable. uint256 index = 0 cost more then uint256 index.AmountDeriver.sol
BasicOrderFulfiller.sol
CriteriaResolution
OrderCombiner.sol
OrderFulfiller.sol
OrderValidator.sol