From 49196755456ead4b596f81ab618e4d594dca8ab4 Mon Sep 17 00:00:00 2001 From: saucepoint Date: Tue, 6 Aug 2024 21:51:03 -0400 Subject: [PATCH] cleanup --- src/base/PosmSharedState.sol | 25 ------------------------- test/shared/fuzz/LiquidityFuzzers.sol | 3 +-- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 src/base/PosmSharedState.sol diff --git a/src/base/PosmSharedState.sol b/src/base/PosmSharedState.sol deleted file mode 100644 index 7299524b..00000000 --- a/src/base/PosmSharedState.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.24; - -import {PositionConfig, PositionConfigLibrary} from "../libraries/PositionConfig.sol"; - -abstract contract PosmSharedState { - using PositionConfigLibrary for *; - - mapping(uint256 tokenId => bytes32 config) internal positionConfigs; - - /// @notice Reverts if the caller is not the owner or approved for the ERC721 token - /// @param caller The address of the caller - /// @param tokenId the unique identifier of the ERC721 token - /// @dev either msg.sender or _msgSender() is passed in as the caller - /// _msgSender() should ONLY be used if this is being called from within the unlockCallback - modifier onlyIfApproved(address caller, uint256 tokenId) virtual; - - /// @notice Reverts if the hash of the config does not equal the saved hash - /// @param tokenId the unique identifier of the ERC721 token - /// @param config the PositionConfig to check against - modifier onlyValidConfig(uint256 tokenId, PositionConfig calldata config) { - if (positionConfigs.getConfigId(tokenId) != config.toId()) revert(); // TODO: IncorrectPositionConfigForTokenId(tokenId); - _; - } -} diff --git a/test/shared/fuzz/LiquidityFuzzers.sol b/test/shared/fuzz/LiquidityFuzzers.sol index ef355bc2..02d6583f 100644 --- a/test/shared/fuzz/LiquidityFuzzers.sol +++ b/test/shared/fuzz/LiquidityFuzzers.sol @@ -7,7 +7,6 @@ import {BalanceDelta, toBalanceDelta} from "@uniswap/v4-core/src/types/BalanceDe import {Currency} from "@uniswap/v4-core/src/types/Currency.sol"; import {Fuzzers} from "@uniswap/v4-core/src/test/Fuzzers.sol"; -import {PositionManager} from "../../../src/PositionManager.sol"; import {IPositionManager} from "../../../src/interfaces/IPositionManager.sol"; import {Actions} from "../../../src/libraries/Actions.sol"; import {PositionConfig} from "../../../src/libraries/PositionConfig.sol"; @@ -41,7 +40,7 @@ contract LiquidityFuzzers is Fuzzers { ) ); - uint256 tokenId = PositionManager(address(lpm)).nextTokenId(); + uint256 tokenId = lpm.nextTokenId(); bytes memory calls = planner.finalizeModifyLiquidityWithClose(config.poolKey); lpm.modifyLiquidities(calls, block.timestamp + 1);