From 7c09fd653a3bf33b7a2dd3d4b02f375165bf8553 Mon Sep 17 00:00:00 2001 From: saucepoint Date: Thu, 23 Jan 2025 18:40:27 -0500 Subject: [PATCH] lower number to prevent OOG --- src/libraries/HookMiner.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/HookMiner.sol b/src/libraries/HookMiner.sol index 2bb2bfba..1e546e90 100644 --- a/src/libraries/HookMiner.sol +++ b/src/libraries/HookMiner.sol @@ -7,8 +7,8 @@ library HookMiner { // mask to slice out the bottom 14 bit of the address uint160 constant FLAG_MASK = 0x3FFF; // 0000 ... 0000 0011 1111 1111 1111 - // Maximum number of iterations to find a salt, avoid infinite loops - uint256 constant MAX_LOOP = 200_000; + // Maximum number of iterations to find a salt, avoid infinite loops or MemoryOOG + uint256 constant MAX_LOOP = 144_444; /// @notice Find a salt that produces a hook address with the desired `flags` /// @param deployer The address that will deploy the hook. In `forge test`, this will be the test contract `address(this)` or the pranking address