diff --git a/src/PositionManager.sol b/src/PositionManager.sol index 47ebf5df..4fbac5e2 100644 --- a/src/PositionManager.sol +++ b/src/PositionManager.sol @@ -154,7 +154,6 @@ contract PositionManager is } /// @notice Enforces that the PoolManager is locked. - /// @dev Reverts if the caller tries to transfer, subscribe, or unsubscribe the position while the PoolManager is unlocked. modifier onlyIfPoolManagerLocked() override { if (poolManager.isUnlocked()) revert PoolManagerMustBeLocked(); _; @@ -438,6 +437,7 @@ contract PositionManager is } /// @dev overrides solmate transferFrom in case a notification to subscribers is needed + /// @dev will revert if pool manager is locked function transferFrom(address from, address to, uint256 id) public virtual override onlyIfPoolManagerLocked { super.transferFrom(from, to, id); if (positionInfo[id].hasSubscriber()) _notifyTransfer(id, from, to); diff --git a/src/base/Notifier.sol b/src/base/Notifier.sol index d847f03e..2965e574 100644 --- a/src/base/Notifier.sol +++ b/src/base/Notifier.sol @@ -30,7 +30,6 @@ abstract contract Notifier is INotifier { modifier onlyIfApproved(address caller, uint256 tokenId) virtual; /// @notice Enforces that the PoolManager is locked. - /// @dev Reverts if the caller tries to transfer, subscribe, or unsubscribe the position while the PoolManager is unlocked. modifier onlyIfPoolManagerLocked() virtual; function _setUnsubscribed(uint256 tokenId) internal virtual; diff --git a/src/interfaces/INotifier.sol b/src/interfaces/INotifier.sol index d6cca908..3eefba3c 100644 --- a/src/interfaces/INotifier.sol +++ b/src/interfaces/INotifier.sol @@ -36,6 +36,7 @@ interface INotifier { /// @param data caller-provided data that's forwarded to the subscriber contract /// @dev Calling subscribe when a position is already subscribed will revert /// @dev payable so it can be multicalled with NATIVE related actions + /// @dev will revert if pool manager is locked function subscribe(uint256 tokenId, address newSubscriber, bytes calldata data) external payable; /// @notice Removes the subscriber from receiving notifications for a respective position @@ -43,6 +44,7 @@ interface INotifier { /// @dev Callers must specify a high gas limit (remaining gas should be higher than unsubscriberGasLimit) such that the subscriber can be notified /// @dev payable so it can be multicalled with NATIVE related actions /// @dev Must always allow a user to unsubscribe. In the case of a malicious subscriber, a user can always unsubscribe safely, ensuring liquidity is always modifiable. + /// @dev will revert if pool manager is locked function unsubscribe(uint256 tokenId) external payable; /// @notice Returns and determines the maximum allowable gas-used for notifying unsubscribe