diff --git a/onchain/script/DeployLocal.sol b/onchain/script/DeployLocal.sol index bf9e696..9cfa464 100644 --- a/onchain/script/DeployLocal.sol +++ b/onchain/script/DeployLocal.sol @@ -141,7 +141,10 @@ contract DeployLocal is Script { console.log("\n[7/7] Bootstrapping VWAP with seed trade..."); // Step 1: Advance time so TWAP oracle has sufficient history. - vm.warp(block.timestamp + 301); + // Track ts explicitly — Forge resets block.timestamp after state-changing calls, + // so block.timestamp + 301 would warp to the same value if used in Step 4. + uint256 ts = block.timestamp + 301; + vm.warp(ts); // Step 2: Fund LM and place initial bootstrap positions. (bool funded,) = address(liquidityManager).call{ value: SEED_LM_ETH }(""); @@ -155,7 +158,8 @@ contract DeployLocal is Script { console.log(" Seed buy executed -> fee generated in anchor position"); // Step 4: Warp forward so TWAP settles at post-buy price and cooldown elapses. - vm.warp(block.timestamp + 301); + ts += 301; + vm.warp(ts); // Step 5: Second recenter records VWAP (bootstrap path + ethFee > 0). liquidityManager.recenter();