From fdc741755d43286957852df1933a3e2f7958dbb2 Mon Sep 17 00:00:00 2001 From: Admazzola Date: Tue, 28 May 2024 15:32:38 -0400 Subject: [PATCH] add getter --- .../LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/contracts/contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol b/packages/contracts/contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol index 4b363d99..049494be 100644 --- a/packages/contracts/contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol +++ b/packages/contracts/contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol @@ -84,6 +84,7 @@ contract LenderCommitmentGroup_Smart is IERC20 public principalToken; IERC20 public collateralToken; + uint24 public uniswapPoolFee; uint256 marketId; @@ -174,6 +175,7 @@ contract LenderCommitmentGroup_Smart is principalToken = IERC20(_principalTokenAddress); collateralToken = IERC20(_collateralTokenAddress); + uniswapPoolFee = _uniswapPoolFee; UNISWAP_V3_POOL = IUniswapV3Factory(UNISWAP_V3_FACTORY).getPool( _principalTokenAddress, @@ -717,6 +719,9 @@ contract LenderCommitmentGroup_Smart is return totalPrincipalTokensLended - totalPrincipalTokensRepaid; } + + + function getCollateralTokenAddress() external view returns (address) { return address(collateralToken); } @@ -765,7 +770,7 @@ contract LenderCommitmentGroup_Smart is getPoolTotalEstimatedValue() , 10000 )); } - + function getMinInterestRate() public view returns (uint16) { return interestRateLowerBound + uint16( uint256(interestRateUpperBound-interestRateLowerBound).percent(getPoolUtilizationRatio()) ); }