@@ -34,33 +34,59 @@ interface ILM_ManualExternalPriceSetter_v1 is IOraclePrice_v1 {
34
34
error Module__LM_ExternalPriceSetter__InvalidPrice ();
35
35
36
36
// -------------------------------------------------------------------------
37
-
38
37
// External Functions
39
38
39
+ /// @notice Gets current price for token issuance (buying tokens).
40
+ /// @return price_ Current price denominated in the collateral token decimals.
41
+ /// @dev The price is denominated in the collateral token decimals. For
42
+ /// example, if the collateral token has 6 decimals and the issuance
43
+ /// price is 1.5, returns 1500000.
44
+ function getPriceForIssuance () external view returns (uint );
45
+
46
+ /// @notice Gets current price for token redemption (selling tokens).
47
+ /// @return price_ Current price denominated in the collateral token decimals.
48
+ /// @dev The price is denominated in the collateral token decimals. For
49
+ /// example, if the collateral token has 6 decimals and the redemption
50
+ /// price is 0.5, the price_ parameter should be 500000.
51
+ function getPriceForRedemption () external view returns (uint );
52
+
40
53
/// @notice Sets the issuance price.
41
54
/// @dev The price_ parameter should be provided with the same number
42
55
/// of decimals as the collateral token. For example, if the
43
- /// collateral token has 6 decimals and the price is 1.5, input
44
- /// should be 1500000.
45
- /// @param price_ The price to set.
56
+ /// collateral token has 6 decimals and the issuance price is 1.5,
57
+ /// the price_ parameter should be 1500000.
58
+ /// @param price_ The issuance price to set, denominated in the collateral
59
+ /// token decimals.
46
60
function setIssuancePrice (uint price_ ) external ;
47
61
48
62
/// @notice Sets the redemption price.
49
63
/// @dev The price_ parameter should be provided with the same number of
50
- /// decimals as the issuance token. For example, if the issuance
51
- /// token has 18 decimals and the price is 1.5, input should be
52
- /// 1500000000000000000.
53
- /// @param price_ The price to set.
64
+ /// of decimals as the collateral token. For example, if the
65
+ /// collateral token has 6 decimals and the redemption price is 0.5,
66
+ /// the price_ parameter should be 500000.
67
+ /// @param price_ The redemption price to set, denominated in the collateral
68
+ /// token decimals.
54
69
function setRedemptionPrice (uint price_ ) external ;
55
70
56
- /// @notice Sets both issuance and redemption prices atomically.
57
- /// @dev Both prices must be non-zero. The issuancePrice_ should be in
58
- /// collateral token decimals and redemptionPrice_ in issuance token
59
- /// decimals.
60
- /// @param issuancePrice_ The issuance price to set.
61
- /// @param redemptionPrice_ The redemption price to set.
71
+ /// @notice Sets both issuance and redemption prices atomically, denominated
72
+ /// in the collateral token decimals.
73
+ /// @dev Both prices must be non-zero. Both the issuance and redemption
74
+ /// prices should be denominated in the collateral token decimals.
75
+ /// For example, if the collateral token has 6 decimals and the
76
+ /// issuance and redemption price are both 1.5, the issuancePrice_
77
+ /// and redemptionPrice_ parameters should be 1500000.
78
+ /// @param issuancePrice_ The issuance price to set, denominated in the
79
+ /// collateral token decimals.
80
+ /// @param redemptionPrice_ The redemption price to set, denominated in
81
+ /// the collateral token decimals.
62
82
function setIssuanceAndRedemptionPrice (
63
83
uint issuancePrice_ ,
64
84
uint redemptionPrice_
65
85
) external ;
86
+
87
+ /// @notice Gets the decimals of the collateral token.
88
+ /// @dev Decimals in which the issuance and redemption prices
89
+ /// are denominated.
90
+ /// @return decimals_ The decimals of the collateral token.
91
+ function getCollateralTokenDecimals () external view returns (uint8 );
66
92
}
0 commit comments