From 59e7f65e19e417a983d91d751ba4a846df2414fd Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Thu, 7 May 2026 10:30:17 +0400 Subject: [PATCH] standardise loop increment to ++i across LibFlow siblings flowERC721 used ++i; flowERC20 and flowERC1155 used i++. All three loops are unchecked so the codegen is identical, but the sibling functions should look identical. Standardised on ++i. Closes #416. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/lib/LibFlow.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/LibFlow.sol b/src/lib/LibFlow.sol index 3bfe7ce9..51e80c80 100644 --- a/src/lib/LibFlow.sol +++ b/src/lib/LibFlow.sol @@ -82,7 +82,7 @@ library LibFlow { function flowERC20(FlowTransferV1 memory flowTransfer) internal { unchecked { ERC20Transfer memory transfer; - for (uint256 i = 0; i < flowTransfer.erc20.length; i++) { + for (uint256 i = 0; i < flowTransfer.erc20.length; ++i) { transfer = flowTransfer.erc20[i]; // We don't support `from` as anyone other than `you` or `me` // as this would allow for all kinds of issues re: approvals. @@ -129,7 +129,7 @@ library LibFlow { function flowERC1155(FlowTransferV1 memory flowTransfer) internal { unchecked { ERC1155Transfer memory transfer; - for (uint256 i = 0; i < flowTransfer.erc1155.length; i++) { + for (uint256 i = 0; i < flowTransfer.erc1155.length; ++i) { transfer = flowTransfer.erc1155[i]; if (transfer.from != msg.sender && transfer.from != address(this)) { revert UnsupportedERC1155Flow();