// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; pragma abicoder v2; import "./ICommonNonfungiblePositionManager.sol"; // Adapted from https://github.com/velodrome-finance/slipstream/blob/main/contracts/periphery/interfaces/INonfungiblePositionManager.sol. /// @title Non-fungible token for positions in SlipStream /// @notice Wraps CL positions in a non-fungible token interface which allows for them to be transferred /// and authorized. interface ISlipStreamNonfungiblePositionManager is ICommonNonfungiblePositionManager { /// @notice Emitted when a new Token Descriptor is set /// @param tokenDescriptor Address of the new Token Descriptor event TokenDescriptorChanged(address indexed tokenDescriptor); /// @notice Emitted when a new Owner is set /// @param owner Address of the new Owner event TransferOwnership(address indexed owner); /// @notice Returns the position information associated with a given token ID. /// @dev Throws if the token ID is not valid. /// @param tokenId The ID of the token that represents the position /// @return nonce The nonce for permits /// @return operator The address that is approved for spending /// @return token0 The address of the token0 for a specific pool /// @return token1 The address of the token1 for a specific pool /// @return tickSpacing The tick spacing associated with the pool /// @return tickLower The lower end of the tick range for the position /// @return tickUpper The higher end of the tick range for the position /// @return liquidity The liquidity of the position /// @return feeGrowthInside0LastX128 The fee growth of token0 as of the last action on the individual position /// @return feeGrowthInside1LastX128 The fee growth of token1 as of the last action on the individual position /// @return tokensOwed0 The uncollected amount of token0 owed to the position as of the last computation /// @return tokensOwed1 The uncollected amount of token1 owed to the position as of the last computation function positions( uint256 tokenId ) external view returns ( uint96 nonce, address operator, address token0, address token1, int24 tickSpacing, int24 tickLower, int24 tickUpper, uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); /// @notice Returns the address of the Token Descriptor, that handles generating token URIs for Positions function tokenDescriptor() external view returns (address); /// @notice Returns the address of the Owner, that is allowed to set a new TokenDescriptor function owner() external view returns (address); struct MintParams { address token0; address token1; int24 tickSpacing; int24 tickLower; int24 tickUpper; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; address recipient; uint256 deadline; uint160 sqrtPriceX96; } /// @notice Creates a new position wrapped in a NFT /// @dev Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized /// a method does not exist, i.e. the pool is assumed to be initialized. /// @param params The params necessary to mint a position, encoded as `MintParams` in calldata /// @return tokenId The ID of the token that represents the minted position /// @return liquidity The amount of liquidity for this position /// @return amount0 The amount of token0 /// @return amount1 The amount of token1 function mint( MintParams calldata params ) external payable returns (uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1); /// @notice Sets a new Token Descriptor /// @param _tokenDescriptor Address of the new Token Descriptor to be chosen function setTokenDescriptor(address _tokenDescriptor) external; /// @notice Sets a new Owner address /// @param _owner Address of the new Owner to be chosen function setOwner(address _owner) external; }