diff --git a/.gitmodules b/.gitmodules index 8e7557c..6100503 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,9 +6,6 @@ path = lib/openzeppelin-contracts url = https://github.com/openzeppelin/openzeppelin-contracts branch = release-v4.9 -[submodule "lib/v5-twab-controller"] - path = lib/v5-twab-controller - url = https://github.com/pooltogether/v5-twab-controller [submodule "lib/prb-math"] branch = v3 path = lib/prb-math @@ -19,3 +16,6 @@ [submodule "lib/owner-manager-contracts"] path = lib/owner-manager-contracts url = https://github.com/pooltogether/owner-manager-contracts +[submodule "lib/pt-v5-twab-controller"] + path = lib/pt-v5-twab-controller + url = https://github.com/GenerationSoftware/pt-v5-twab-controller diff --git a/lib/pt-v5-twab-controller b/lib/pt-v5-twab-controller new file mode 160000 index 0000000..1cdf78e --- /dev/null +++ b/lib/pt-v5-twab-controller @@ -0,0 +1 @@ +Subproject commit 1cdf78e87a3d9127f85a3755024f143664643c5e diff --git a/lib/v5-twab-controller b/lib/v5-twab-controller deleted file mode 160000 index 1cf1554..0000000 --- a/lib/v5-twab-controller +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1cf1554c4ee145a2c1d7944ea5dc4123c880bc69 diff --git a/remappings.txt b/remappings.txt index 9b44dc6..f3cf3a4 100644 --- a/remappings.txt +++ b/remappings.txt @@ -3,6 +3,6 @@ prb-math/=lib/prb-math/src/ openzeppelin=lib/openzeppelin-contracts/contracts/ src/=src/ test/=test/ -v5-twab-controller/=lib/v5-twab-controller/src/ +v5-twab-controller/=lib/pt-v5-twab-controller/src/ ring-buffer-lib/=lib/ring-buffer-lib/src/ owner-manager-contracts/=lib/owner-manager-contracts/contracts/ diff --git a/test/PrizePool.t.sol b/test/PrizePool.t.sol index f3d58fd..f1abaa8 100644 --- a/test/PrizePool.t.sol +++ b/test/PrizePool.t.sol @@ -88,10 +88,10 @@ contract PrizePoolTest is Test { vm.warp(startTimestamp); prizeToken = new ERC20Mintable("PoolTogether POOL token", "POOL"); - twabController = new TwabController(); + drawPeriodSeconds = 1 days; + twabController = new TwabController(drawPeriodSeconds, uint32(block.timestamp)); lastClosedDrawStartedAt = uint64(block.timestamp + 1 days); // set draw start 1 day into future - drawPeriodSeconds = 1 days; initialNumberOfTiers = 3; address drawManager = address(this); diff --git a/test/invariants/helpers/PrizePoolFuzzHarness.sol b/test/invariants/helpers/PrizePoolFuzzHarness.sol index 1cfc2fe..4425f69 100644 --- a/test/invariants/helpers/PrizePoolFuzzHarness.sol +++ b/test/invariants/helpers/PrizePoolFuzzHarness.sol @@ -30,7 +30,7 @@ contract PrizePoolFuzzHarness is CommonBase { SD1x18 smoothing = SD1x18.wrap(0.9e18); token = new ERC20Mintable("name", "SYMBOL"); - TwabController twabController = new TwabController(); + TwabController twabController = new TwabController(drawPeriodSeconds, uint32(block.timestamp)); // arbitrary mint twabController.mint(address(this), 100e18);