diff --git a/src/PoolManager.sol b/src/PoolManager.sol index d2587c304..a85a4a71a 100644 --- a/src/PoolManager.sol +++ b/src/PoolManager.sol @@ -98,6 +98,8 @@ contract PoolManager is IPoolManager, ProtocolFees, NoDelegateCall, ERC6909Claim _; } + constructor(address initialOwner) ProtocolFees(initialOwner) {} + /// @inheritdoc IPoolManager function unlock(bytes calldata data) external override returns (bytes memory result) { if (Lock.isUnlocked()) AlreadyUnlocked.selector.revertWith(); diff --git a/src/ProtocolFees.sol b/src/ProtocolFees.sol index cfae6bceb..8d6c5d9ce 100644 --- a/src/ProtocolFees.sol +++ b/src/ProtocolFees.sol @@ -23,7 +23,7 @@ abstract contract ProtocolFees is IProtocolFees, Owned { /// @inheritdoc IProtocolFees address public protocolFeeController; - constructor() Owned(msg.sender) {} + constructor(address initialOwner) Owned(initialOwner) {} /// @inheritdoc IProtocolFees function setProtocolFeeController(address controller) external onlyOwner { diff --git a/src/test/ProtocolFeesImplementation.sol b/src/test/ProtocolFeesImplementation.sol index f485e26e1..f26ac849e 100644 --- a/src/test/ProtocolFeesImplementation.sol +++ b/src/test/ProtocolFeesImplementation.sol @@ -12,6 +12,8 @@ contract ProtocolFeesImplementation is ProtocolFees { mapping(PoolId id => Pool.State) internal _pools; bool internal isUnlocked; + constructor() ProtocolFees(msg.sender) {} + // Used to set the price of a pool to pretend that the pool has been initialized in order to successfully set a protocol fee function setPrice(PoolKey memory key, uint160 sqrtPriceX96) public { Pool.State storage pool = _getPool(key.toId()); diff --git a/src/test/ProxyPoolManager.sol b/src/test/ProxyPoolManager.sol index a8a4415df..6fbdbc2a4 100644 --- a/src/test/ProxyPoolManager.sol +++ b/src/test/ProxyPoolManager.sol @@ -44,7 +44,7 @@ contract ProxyPoolManager is IPoolManager, ProtocolFees, NoDelegateCall, ERC6909 address internal immutable _delegateManager; - constructor(address delegateManager) { + constructor(address delegateManager) ProtocolFees(msg.sender) { _delegateManager = delegateManager; } diff --git a/test/NoDelegateCall.t.sol b/test/NoDelegateCall.t.sol index de62065ff..612c9acb8 100644 --- a/test/NoDelegateCall.t.sol +++ b/test/NoDelegateCall.t.sol @@ -13,7 +13,7 @@ import {Deployers} from "./utils/Deployers.sol"; contract TestDelegateCall is Test, Deployers { // override to use ProxyPoolManager function deployFreshManager() internal virtual override { - IPoolManager delegateManager = new PoolManager(); + IPoolManager delegateManager = new PoolManager(address(this)); manager = new ProxyPoolManager(address(delegateManager)); } diff --git a/test/utils/Deployers.sol b/test/utils/Deployers.sol index 7cbc90cf9..88559148b 100644 --- a/test/utils/Deployers.sol +++ b/test/utils/Deployers.sol @@ -84,7 +84,7 @@ contract Deployers is Test { } function deployFreshManager() internal virtual { - manager = new PoolManager(); + manager = new PoolManager(address(this)); } function deployFreshManagerAndRouters() internal {