diff --git a/src/LiquidityManagerV2.sol b/src/LiquidityManagerV2.sol index 3df1694..66c5dbd 100644 --- a/src/LiquidityManagerV2.sol +++ b/src/LiquidityManagerV2.sol @@ -528,4 +528,52 @@ contract LiquidityManagerV2 is Ownable, ReentrancyGuard, Pausable { emit EmergencyWithdrawInitiated(msg.sender, poolId, provider.emergencyWithdrawTime); } + + /** + * @notice Claim vested tokens + */ + function claimVestedTokens() external nonReentrant { + vestingContract.release(msg.sender); + } + + //////////////////// + // View Functions // + //////////////////// + + /** + * @notice Check if liquidity threshold is met for a user + * @param token Token address to check + * @param user User address + * @return Whether threshold is met + */ + function isThresholdMet(address token, address user) external view returns (bool) { + // This is a simplified implementation + // In practice, you'd check across all pools containing this token + return true; // Placeholder + } + + /** + * @notice Get pool information + * @param poolId Pool identifier + * @return initialized Whether pool is initialized + * @return totalLiquidity Total liquidity in pool + * @return liquidityThreshold Threshold for vesting + * @return vestingDuration Duration of vesting + * @return providersCount Number of liquidity providers + */ + function getPoolInfo(bytes32 poolId) + external + view + returns ( + bool initialized, + uint256 totalLiquidity, + uint256 liquidityThreshold, + uint256 vestingDuration, + uint256 providersCount + ) + { + PoolInfo storage pool = poolInfo[poolId]; + return + (pool.initialized, pool.totalLiquidity, pool.liquidityThreshold, pool.vestingDuration, pool.providersCount); + } }