@gearbox-protocol/periphery-v3 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -184,7 +184,7 @@ contract DataCompressorV2_10 is
|
|
|
184
184
|
|
|
185
185
|
result.addr = _creditManager;
|
|
186
186
|
result.cfVersion = ver;
|
|
187
|
-
result.
|
|
187
|
+
result.name = cmDescriptions[_creditManager];
|
|
188
188
|
|
|
189
189
|
result.underlying = creditManagerV2.underlying();
|
|
190
190
|
|
|
@@ -258,7 +258,7 @@ contract DataCompressorV3_00 is IDataCompressorV3_00, ContractsRegisterTrait, Li
|
|
|
258
258
|
returns (CollateralDebtData memory collateralDebtData) {
|
|
259
259
|
result.accruedInterest = collateralDebtData.accruedInterest;
|
|
260
260
|
result.accruedFees = collateralDebtData.accruedFees;
|
|
261
|
-
result.healthFactor = collateralDebtData.twvUSD * PERCENTAGE_FACTOR / collateralDebtData.
|
|
261
|
+
result.healthFactor = collateralDebtData.twvUSD * PERCENTAGE_FACTOR / collateralDebtData.totalDebtUSD;
|
|
262
262
|
result.totalValue = collateralDebtData.totalValue;
|
|
263
263
|
result.isSuccessful = true;
|
|
264
264
|
} catch {
|
|
@@ -344,7 +344,7 @@ contract DataCompressorV3_00 is IDataCompressorV3_00, ContractsRegisterTrait, Li
|
|
|
344
344
|
ICreditFacadeV3 creditFacade = _getCreditFacade(address(creditManager));
|
|
345
345
|
|
|
346
346
|
result.addr = _cm;
|
|
347
|
-
result.
|
|
347
|
+
result.name = _getName(_cm);
|
|
348
348
|
result.cfVersion = _getVersion(address(creditFacade));
|
|
349
349
|
|
|
350
350
|
result.underlying = creditManager.underlying();
|
|
@@ -707,17 +707,17 @@ contract DataCompressorV3_00 is IDataCompressorV3_00, ContractsRegisterTrait, Li
|
|
|
707
707
|
|
|
708
708
|
(uint96 votesLpSide, uint96 votesCaSide) = IGaugeV3(gauge).userTokenVotes(staker, token);
|
|
709
709
|
|
|
710
|
-
if (
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
}
|
|
719
|
-
++index;
|
|
710
|
+
if (op == QUERY) {
|
|
711
|
+
gaugeVotes[index] = GaugeVote({
|
|
712
|
+
gauge: gauge,
|
|
713
|
+
token: token,
|
|
714
|
+
currentEpoch: IGaugeV3(gauge).epochLastUpdate(),
|
|
715
|
+
epochFrozen: IGaugeV3(gauge).epochFrozen(),
|
|
716
|
+
totalVotesLpSide: votesLpSide,
|
|
717
|
+
totalVotesCaSide: votesCaSide
|
|
718
|
+
});
|
|
720
719
|
}
|
|
720
|
+
++index;
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
}
|
package/contracts/data/Types.sol
CHANGED
|
@@ -86,7 +86,7 @@ struct LinearModel {
|
|
|
86
86
|
|
|
87
87
|
struct CreditManagerData {
|
|
88
88
|
address addr;
|
|
89
|
-
string
|
|
89
|
+
string name;
|
|
90
90
|
uint256 cfVersion;
|
|
91
91
|
address creditFacade; // V2 only: address of creditFacade
|
|
92
92
|
address creditConfigurator; // V2 only: address of creditConfigurator
|
|
@@ -179,6 +179,8 @@ struct GaugeInfo {
|
|
|
179
179
|
struct GaugeVote {
|
|
180
180
|
address gauge;
|
|
181
181
|
address token;
|
|
182
|
+
uint16 currentEpoch;
|
|
183
|
+
bool epochFrozen;
|
|
182
184
|
uint96 totalVotesLpSide;
|
|
183
185
|
uint96 totalVotesCaSide;
|
|
184
186
|
}
|
package/package.json
CHANGED