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
[G-00] Unnecessary initialization of integers to zero
In for loops
conduit\Conduit.sol: for (uint256 i = 0; i < totalStandardTransfers; ) {
conduit\Conduit.sol: for (uint256 i = 0; i < totalStandardTransfers; ) {
lib\BasicOrderFulfiller.sol: for (uint256 i = 0; i < totalAdditionalRecipients; ) {
lib\BasicOrderFulfiller.sol: for (uint256 i = 0; i < totalAdditionalRecipients; ) {
lib\CriteriaResolution.sol: for (uint256 i = 0; i < totalCriteriaResolvers; ++i) {
lib\CriteriaResolution.sol: for (uint256 i = 0; i < totalAdvancedOrders; ++i) {
lib\OrderCombiner.sol: for (uint256 i = 0; i < totalOrders; ++i) {
lib\OrderCombiner.sol: for (uint256 i = 0; i < totalOrders; ++i) {
lib\OrderCombiner.sol: for (uint256 i = 0; i < totalOfferFulfillments; ++i) {
lib\OrderCombiner.sol: for (uint256 i = 0; i < totalConsiderationFulfillments; ++i) {
lib\OrderCombiner.sol: for (uint256 i = 0; i < totalOrders; ++i) {
lib\OrderCombiner.sol: for (uint256 i = 0; i < executions.length; ) {
lib\OrderCombiner.sol: for (uint256 i = 0; i < totalFulfillments; ++i) {
lib\OrderFulfiller.sol: for (uint256 i = 0; i < orderParameters.offer.length; ) {
lib\OrderFulfiller.sol: for (uint256 i = 0; i < orderParameters.consideration.length; ) {
lib\OrderFulfiller.sol: for (uint256 i = 0; i < totalOrders; ++i) {
lib\OrderValidator.sol: for (uint256 i = 0; i < totalOrders; ) {
lib\OrderValidator.sol: for (uint256 i = 0; i < totalOrders; ) {
lib\CriteriaResolution.sol: for (uint256 j = 0; j < totalItems; ++j) {
lib\CriteriaResolution.sol: for (uint256 j = 0; j < totalItems; ++j) {
lib\OrderCombiner.sol: for (uint256 j = 0; j < offer.length; ++j) {
lib\OrderCombiner.sol: for (uint256 j = 0; j < consideration.length; ++j) {
lib\OrderCombiner.sol: for (uint256 j = 0; j < consideration.length; ++j) {
Variable extraCeling
lib\AmountDeriver.sol: uint256 extraCeiling = 0;
[G-01] ++i and (++j) costs less gas compared to i++ (j++)
At many parts of your code (especially for loops) you are using i++. I suggest change all for ++i.
The text was updated successfully, but these errors were encountered:
This should be optimized by the compiler automatically. I tested this and confirmed it's not beneficial - some functions save a tiny amount, others got a bit worse.
++i and (++j) costs less gas compared to i++ (j++)
Gas Report for OpenSea by Perito Flores
[G-00] Unnecessary initialization of integers to zero
In for loops
Variable extraCeling
[G-01] ++i and (++j) costs less gas compared to i++ (j++)
At many parts of your code (especially for loops) you are using i++. I suggest change all for ++i.
The text was updated successfully, but these errors were encountered: