Skip to content

Commit

Permalink
remove second loop in the EVM settleOrders implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
thal0x committed Oct 30, 2024
1 parent c4f4103 commit 733fb25
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions solidity/src/FastTransferGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -416,19 +416,6 @@ contract FastTransferGateway is Initializable, UUPSUpgradeable, OwnableUpgradeab
);

amountToRepay += orderSettlementDetails.amount;
}

// effects
for (uint256 pos = 0; pos < orderIDs.length; pos += 32) {
bytes32 orderID;
assembly {
orderID := mload(add(orderIDs, add(0x20, pos)))
}

if (orderStatuses[orderID] != OrderStatus.UNFILLED) {
emit OrderAlreadySettled(orderID);
continue;
}

orderStatuses[orderID] = OrderStatus.FILLED;
emit OrderSettled(orderID);
Expand Down

0 comments on commit 733fb25

Please sign in to comment.