Skip to content

Commit

Permalink
shenanigansssss
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds committed Aug 7, 2024
1 parent d0fac81 commit cf2b4a3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/PositionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion src/base/Permit2Forwarder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/base/PositionActionsRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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")
{}

Expand Down
2 changes: 1 addition & 1 deletion test/mocks/MockPermit2Forwarder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
}

0 comments on commit cf2b4a3

Please sign in to comment.