diff --git a/src/PositionManager.sol b/src/PositionManager.sol index 2753332d8..66f17cb1f 100644 --- a/src/PositionManager.sol +++ b/src/PositionManager.sol @@ -114,6 +114,7 @@ contract PositionManager is using PoolKeyChecker for PoolKey; using PositionInfoLibrary for PositionInfo; + /// @inheritdoc IPositionManager /// @dev The ID of the next token that will be minted. Skips 0 uint256 public nextTokenId = 1; @@ -162,6 +163,7 @@ contract PositionManager is _executeActionsWithoutUnlock(actions, params); } + /// @inheritdoc BaseActionsRouter function msgSender() public view override returns (address) { return _getLocker(); } diff --git a/src/base/EIP712_v4.sol b/src/base/EIP712_v4.sol index 48e607bd8..66b7070a6 100644 --- a/src/base/EIP712_v4.sol +++ b/src/base/EIP712_v4.sol @@ -25,9 +25,9 @@ contract EIP712_v4 is IEIP712_v4 { _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(); } - /// @notice Returns the domain separator for the current chain. - /// @dev Uses cached version if chainid is unchanged from construction. + /// @inheritdoc IEIP712_v4 function DOMAIN_SEPARATOR() public view override returns (bytes32) { + // uses cached version if chainid is unchanged from construction return block.chainid == _CACHED_CHAIN_ID ? _CACHED_DOMAIN_SEPARATOR : _buildDomainSeparator(); } diff --git a/src/base/Notifier.sol b/src/base/Notifier.sol index 341a5ac50..7ce5ed93f 100644 --- a/src/base/Notifier.sol +++ b/src/base/Notifier.sol @@ -26,6 +26,7 @@ abstract contract Notifier is INotifier { // at 30M gas, the limit is 300K uint256 private constant BLOCK_LIMIT_BPS = 100; + /// @inheritdoc INotifier mapping(uint256 tokenId => ISubscriber subscriber) public subscriber; modifier onlyIfApproved(address caller, uint256 tokenId) virtual; diff --git a/src/interfaces/IEIP712_v4.sol b/src/interfaces/IEIP712_v4.sol index 622f7c068..70c4faa5e 100644 --- a/src/interfaces/IEIP712_v4.sol +++ b/src/interfaces/IEIP712_v4.sol @@ -1,6 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; +/// @notice This interface is used for an EIP712 implementation interface IEIP712_v4 { + /// @notice Returns the domain separator for the current chain. + /// @return bytes32 The domain separator function DOMAIN_SEPARATOR() external view returns (bytes32); } diff --git a/src/interfaces/IERC721Permit_v4.sol b/src/interfaces/IERC721Permit_v4.sol index 02b3eb977..637e9b33f 100644 --- a/src/interfaces/IERC721Permit_v4.sol +++ b/src/interfaces/IERC721Permit_v4.sol @@ -23,6 +23,7 @@ interface IERC721Permit_v4 { /// @param operator The address that will be set as an operator for the owner /// @param approved The permission to set on the operator /// @param deadline The deadline timestamp by which the call must be mined for the approve to work + /// @param nonce The nonce of the owner's permit /// @param signature Concatenated data from a valid secp256k1 signature from the holder, i.e. abi.encodePacked(r, s, v) /// @dev payable so it can be multicalled with NATIVE related actions function permitForAll( diff --git a/src/interfaces/INotifier.sol b/src/interfaces/INotifier.sol index bf0fced0a..d9002342e 100644 --- a/src/interfaces/INotifier.sol +++ b/src/interfaces/INotifier.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.24; import {PositionConfig} from "../libraries/PositionConfig.sol"; +import {ISubscriber} from "./ISubscriber.sol"; /// @notice This interface is used to opt in to sending updates to external contracts about position modifications or transfers interface INotifier { @@ -12,13 +13,18 @@ interface INotifier { /// @notice Wraps the revert message of the subscriber contract on a reverting transfer notification error Wrap__TransferNotificationReverted(address subscriber, bytes reason); + /// @notice Returns the subscriber for a respective position + /// @param tokenId the ERC721 tokenId + /// @return subscriber the subscriber contract + function subscriber(uint256 tokenId) external view returns (ISubscriber subscriber); + /// @notice Enables the subscriber to receive notifications for a respective position /// @param tokenId the ERC721 tokenId - /// @param subscriber the address to notify + /// @param newSubscriber the address of the subscriber contract /// @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 - function subscribe(uint256 tokenId, address subscriber, bytes calldata data) external payable; + 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 diff --git a/src/interfaces/IPositionManager.sol b/src/interfaces/IPositionManager.sol index 9b52bf1bd..13cd95b93 100644 --- a/src/interfaces/IPositionManager.sol +++ b/src/interfaces/IPositionManager.sol @@ -12,9 +12,9 @@ interface IPositionManager is INotifier { /// @notice Unlocks Uniswap v4 PoolManager and batches actions for modifying liquidity /// @dev This is the standard entrypoint for the PositionManager - /// @param payload is an encoding of actions, and parameters for those actions + /// @param unlockData is an encoding of actions, and parameters for those actions /// @param deadline is the deadline for the batched actions to be executed - function modifyLiquidities(bytes calldata payload, uint256 deadline) external payable; + function modifyLiquidities(bytes calldata unlockData, uint256 deadline) external payable; /// @notice Batches actions for modifying liquidity without unlocking v4 PoolManager /// @dev This must be called by a contract that has already unlocked the v4 PoolManager diff --git a/src/interfaces/IQuoter.sol b/src/interfaces/IQuoter.sol index 3b96bca2d..c1fcfb63e 100644 --- a/src/interfaces/IQuoter.sol +++ b/src/interfaces/IQuoter.sol @@ -47,7 +47,7 @@ interface IQuoter { /// @return deltaAmounts Delta amounts resulted from the swap /// @return sqrtPriceX96After The sqrt price of the pool after the swap /// @return initializedTicksLoaded The number of initialized ticks that the swap loaded - function quoteExactInputSingle(QuoteExactSingleParams calldata params) + function quoteExactInputSingle(QuoteExactSingleParams memory params) external returns (int128[] memory deltaAmounts, uint160 sqrtPriceX96After, uint32 initializedTicksLoaded); @@ -77,7 +77,7 @@ interface IQuoter { /// @return deltaAmounts Delta amounts resulted from the swap /// @return sqrtPriceX96After The sqrt price of the pool after the swap /// @return initializedTicksLoaded The number of initialized ticks that the swap loaded - function quoteExactOutputSingle(QuoteExactSingleParams calldata params) + function quoteExactOutputSingle(QuoteExactSingleParams memory params) external returns (int128[] memory deltaAmounts, uint160 sqrtPriceX96After, uint32 initializedTicksLoaded);