From cf2b4a3ac03104a9624fbf6eabdaa741379939db Mon Sep 17 00:00:00 2001 From: Sara Reynolds Date: Tue, 6 Aug 2024 22:42:08 -0400 Subject: [PATCH] shenanigansssss --- src/PositionManager.sol | 5 ++++- src/base/Permit2Forwarder.sol | 4 +++- src/base/PositionActionsRouter.sol | 5 ++--- test/mocks/MockPermit2Forwarder.sol | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/PositionManager.sol b/src/PositionManager.sol index 9851bf1d..5b4648fd 100644 --- a/src/PositionManager.sol +++ b/src/PositionManager.sol @@ -11,7 +11,10 @@ import {Permit2Forwarder} from "./base/Permit2Forwarder.sol"; import {Multicall_v4} from "./base/Multicall_v4.sol"; contract PositionManager is IPositionManager, PositionActionsRouter, PoolInitializer, Permit2Forwarder, Multicall_v4 { - constructor(IPoolManager _poolManager, IAllowanceTransfer _permit2) PositionActionsRouter(_poolManager, _permit2) {} + constructor(IPoolManager _poolManager, IAllowanceTransfer _permit2) + PositionActionsRouter(_poolManager) + Permit2Forwarder(_permit2) + {} /// @inheritdoc IPositionManager function modifyLiquidities(bytes calldata unlockData, uint256 deadline) diff --git a/src/base/Permit2Forwarder.sol b/src/base/Permit2Forwarder.sol index 31ae1f43..09b0646c 100644 --- a/src/base/Permit2Forwarder.sol +++ b/src/base/Permit2Forwarder.sol @@ -8,9 +8,11 @@ import {Permit2ImmutableState} from "./Permit2ImmutableState.sol"; /// @notice PermitForwarder allows permitting this contract as a spender on permit2 /// @dev This contract does not enforce the spender to be this contract, but that is the intended use case -abstract contract Permit2Forwarder is IPermit2Forwarder, Permit2ImmutableState { +contract Permit2Forwarder is IPermit2Forwarder, Permit2ImmutableState { + constructor(IAllowanceTransfer _permit2) Permit2ImmutableState(_permit2) {} /// @notice allows forwarding a single permit to permit2 /// @dev this function is payable to allow multicall with NATIVE based actions + function permit(address owner, IAllowanceTransfer.PermitSingle calldata permitSingle, bytes calldata signature) external payable diff --git a/src/base/PositionActionsRouter.sol b/src/base/PositionActionsRouter.sol index 89ae03fe..0bc32b5c 100644 --- a/src/base/PositionActionsRouter.sol +++ b/src/base/PositionActionsRouter.sol @@ -24,7 +24,7 @@ import {ReentrancyLock} from "./ReentrancyLock.sol"; import {Permit2ImmutableState} from "./Permit2ImmutableState.sol"; import {IPositionActionsRouter} from "../interfaces/IPositionActionsRouter.sol"; -contract PositionActionsRouter is +abstract contract PositionActionsRouter is IPositionActionsRouter, ERC721Permit_v4, DeltaResolver, @@ -48,9 +48,8 @@ contract PositionActionsRouter is mapping(uint256 tokenId => bytes32 config) private _positionConfigs; - constructor(IPoolManager _poolManager, IAllowanceTransfer _permit2) + constructor(IPoolManager _poolManager) BaseActionsRouter(_poolManager) - Permit2ImmutableState(_permit2) ERC721Permit_v4("Uniswap V4 Positions NFT", "UNI-V4-POSM") {} diff --git a/test/mocks/MockPermit2Forwarder.sol b/test/mocks/MockPermit2Forwarder.sol index d02b52f2..720851bd 100644 --- a/test/mocks/MockPermit2Forwarder.sol +++ b/test/mocks/MockPermit2Forwarder.sol @@ -7,5 +7,5 @@ import {Permit2Forwarder} from "../../src/base/Permit2Forwarder.sol"; import {Permit2ImmutableState} from "../../src/base/Permit2ImmutableState.sol"; contract MockPermit2Forwarder is Permit2Forwarder { - constructor(IAllowanceTransfer _permit2) Permit2ImmutableState(_permit2) {} + constructor(IAllowanceTransfer _permit2) Permit2Forwarder(_permit2) {} }