@@ -55,7 +55,7 @@ abstract contract LPPriceFeed is ILPPriceFeed, AbstractPriceFeed, ACLNonReentran
5555 /// @dev Returns upper-bounded LP token exhcange rate and its scale, reverts if rate falls below the lower bound
5656 /// @dev When computing LP token price, this MUST be used to get the exchange rate
5757 function _getValidatedLPExchangeRate () internal view returns (uint256 exchangeRate ) {
58- exchangeRate = _getLPExchangeRate ();
58+ exchangeRate = getLPExchangeRate ();
5959
6060 uint256 lb = lowerBound;
6161 if (exchangeRate < lb) revert ValueOutOfRangeException ();
@@ -65,7 +65,7 @@ abstract contract LPPriceFeed is ILPPriceFeed, AbstractPriceFeed, ACLNonReentran
6565 }
6666
6767 /// @dev Returns LP token exchange rate, must be implemented by derived price feeds
68- function _getLPExchangeRate () internal view virtual returns (uint256 exchangeRate );
68+ function getLPExchangeRate () public view virtual returns (uint256 exchangeRate );
6969
7070 /// @dev Computes upper bound as `lowerBound * (1 + delta)`
7171 function _upperBound (uint256 lb ) internal view returns (uint256 ) {
@@ -84,7 +84,7 @@ abstract contract LPPriceFeed is ILPPriceFeed, AbstractPriceFeed, ACLNonReentran
8484 override
8585 controllerOnly // F:[LPF-4]
8686 {
87- uint256 exchangeRate = _getLPExchangeRate ();
87+ uint256 exchangeRate = getLPExchangeRate ();
8888 if (newLowerBound == 0 || exchangeRate < newLowerBound || exchangeRate > _upperBound (newLowerBound)) {
8989 revert IncorrectLimitsException (); // F:[LPF-4]
9090 }
@@ -96,7 +96,7 @@ abstract contract LPPriceFeed is ILPPriceFeed, AbstractPriceFeed, ACLNonReentran
9696 /// @dev Derived price feeds MUST call this in the constructor after initializing all the
9797 /// state variables needed for exchange rate calculation
9898 function _initLimiter () internal {
99- uint256 newLowerBound = _getLPExchangeRate ();
99+ uint256 newLowerBound = getLPExchangeRate ();
100100 lowerBound = newLowerBound;
101101 emit SetBounds (newLowerBound, _upperBound (newLowerBound));
102102 }
0 commit comments