@gearbox-protocol/periphery-v3 1.2.5 → 1.2.6

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.
@@ -25,6 +25,8 @@ import {PoolService} from "@gearbox-protocol/core-v2/contracts/pool/PoolService.
25
25
 
26
26
  import {IVersion} from "@gearbox-protocol/core-v2/contracts/interfaces/IVersion.sol";
27
27
 
28
+ import {ACLNonReentrantTrait} from "@gearbox-protocol/core-v3/contracts/traits/ACLNonReentrantTrait.sol";
29
+
28
30
  import {IAddressProvider} from "@gearbox-protocol/core-v2/contracts/interfaces/IAddressProvider.sol";
29
31
  import {IDataCompressorV2_10} from "../interfaces/IDataCompressorV2_10.sol";
30
32
 
@@ -39,11 +41,21 @@ import {LinearInterestModelHelper} from "./LinearInterestModelHelper.sol";
39
41
  /// @title Data compressor 2.1.
40
42
  /// @notice Collects data from various contracts for use in the dApp
41
43
  /// Do not use for data from data compressor for state-changing functions
42
- contract DataCompressorV2_10 is IDataCompressorV2_10, ContractsRegisterTrait, LinearInterestModelHelper {
44
+ contract DataCompressorV2_10 is
45
+ IDataCompressorV2_10,
46
+ ACLNonReentrantTrait,
47
+ ContractsRegisterTrait,
48
+ LinearInterestModelHelper
49
+ {
43
50
  // Contract version
44
51
  uint256 public constant version = 2_10;
45
52
 
46
- constructor(address _addressProvider) ContractsRegisterTrait(_addressProvider) {}
53
+ mapping(address => string) public cmDescriptions;
54
+
55
+ constructor(address _addressProvider)
56
+ ACLNonReentrantTrait(_addressProvider)
57
+ ContractsRegisterTrait(_addressProvider)
58
+ {}
47
59
 
48
60
  /// @dev Returns CreditAccountData for all opened accounts for particular borrower
49
61
  /// @param borrower Borrower address
@@ -172,6 +184,7 @@ contract DataCompressorV2_10 is IDataCompressorV2_10, ContractsRegisterTrait, Li
172
184
 
173
185
  result.addr = _creditManager;
174
186
  result.cfVersion = ver;
187
+ result.description = cmDescriptions[_creditManager];
175
188
 
176
189
  result.underlying = creditManagerV2.underlying();
177
190
 
@@ -390,4 +403,8 @@ contract DataCompressorV2_10 is IDataCompressorV2_10, ContractsRegisterTrait, Li
390
403
  }
391
404
  }
392
405
  }
406
+
407
+ function setCreditManagerDescription(address _cm, string calldata description) external controllerOnly {
408
+ cmDescriptions[_cm] = description;
409
+ }
393
410
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/periphery-v3",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "main": "index.js",
5
5
  "repository": "git@github.com:Gearbox-protocol/periphery-v3.git",
6
6
  "author": "Mikael <26343374+0xmikko@users.noreply.github.com>",