Skip to content

Commit

Permalink
comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds committed Oct 24, 2024
1 parent 1690237 commit cd1c80a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PositionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
_;
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/base/Notifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/INotifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ 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
/// @param tokenId the ERC721 tokenId
/// @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
Expand Down

0 comments on commit cd1c80a

Please sign in to comment.