Skip to content

Commit

Permalink
minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint committed Aug 4, 2024
1 parent 3db5ede commit 5e998cc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/interfaces/IPositionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface IPositionManager is INotifier {
/// @param deadline is the deadline for the batched actions to be executed
function unlockAndModifyLiquidities(bytes calldata payload, uint256 deadline) external payable;

function modifyLiquidities(bytes memory actions, bytes[] memory params) external payable;
function modifyLiquidities(bytes calldata actions, bytes[] calldata params) external payable;

function nextTokenId() external view returns (uint256);

Expand Down
13 changes: 0 additions & 13 deletions test/position-managers/PositionManager.modifiyLiquidities.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,18 @@ import {Currency, CurrencyLibrary} from "@uniswap/v4-core/src/types/Currency.sol
import {PoolId, PoolIdLibrary} from "@uniswap/v4-core/src/types/PoolId.sol";
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
import {BalanceDelta} from "@uniswap/v4-core/src/types/BalanceDelta.sol";
import {LiquidityAmounts} from "@uniswap/v4-core/test/utils/LiquidityAmounts.sol";
import {TickMath} from "@uniswap/v4-core/src/libraries/TickMath.sol";
import {FixedPointMathLib} from "solmate/src/utils/FixedPointMathLib.sol";
import {StateLibrary} from "@uniswap/v4-core/src/libraries/StateLibrary.sol";
import {LPFeeLibrary} from "@uniswap/v4-core/src/libraries/LPFeeLibrary.sol";
import {IAllowanceTransfer} from "permit2/src/interfaces/IAllowanceTransfer.sol";
import {Position} from "@uniswap/v4-core/src/libraries/Position.sol";
import {SafeCast} from "@uniswap/v4-core/src/libraries/SafeCast.sol";

import {IERC20} from "forge-std/interfaces/IERC20.sol";

import {IPositionManager} from "../../src/interfaces/IPositionManager.sol";
import {Actions} from "../../src/libraries/Actions.sol";
import {PositionManager} from "../../src/PositionManager.sol";
import {DeltaResolver} from "../../src/base/DeltaResolver.sol";
import {PositionConfig} from "../../src/libraries/PositionConfig.sol";
import {SlippageCheckLibrary} from "../../src/libraries/SlippageCheck.sol";
import {BaseActionsRouter} from "../../src/base/BaseActionsRouter.sol";
import {Constants} from "../../src/libraries/Constants.sol";

import {LiquidityFuzzers} from "../shared/fuzz/LiquidityFuzzers.sol";
import {Planner, Plan} from "../shared/Planner.sol";
import {PosmTestSetup} from "../shared/PosmTestSetup.sol";
import {ReentrantToken} from "../mocks/ReentrantToken.sol";
import {ReentrancyLock} from "../../src/base/ReentrancyLock.sol";

contract PositionManagerModifyLiquiditiesTest is Test, PosmTestSetup, LiquidityFuzzers {
using StateLibrary for IPoolManager;
Expand Down
2 changes: 1 addition & 1 deletion test/shared/HookModifyLiquidities.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {IERC20} from "forge-std/interfaces/IERC20.sol";

import {IPositionManager} from "../../src/interfaces/IPositionManager.sol";

/// @notice This contract is NOT a production use contract. It is meant to be used in testing to verify the delta amounts against changes in a user's balance.
/// @notice This contract is NOT a production use contract. It is meant to be used in testing to verify that external contracts can modify liquidity without a lock (IPositionManager.modifyLiquidities)
/// @dev a hook that can modify liquidity in beforeSwap
contract HookModifyLiquidities is HookSavesDelta {
IPositionManager posm;
Expand Down
1 change: 1 addition & 0 deletions test/shared/PosmTestSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ contract PosmTestSetup is Test, Deployers, DeployPermit2, LiquidityOperations {
hook = HookSavesDelta(hookAddr);
}

/// @dev deploys a special test hook where beforeSwap hookData is used to modify liquidity
function deployPosmHookModifyLiquidities() public {
HookModifyLiquidities impl = new HookModifyLiquidities();
vm.etch(hookModifyLiquiditiesAddr, address(impl).code);
Expand Down

0 comments on commit 5e998cc

Please sign in to comment.