Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/LiquidityManagerV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Loading