@@ -13,6 +13,10 @@ import {IContractsRegisterLegacy} from
1313import {ACL} from "@gearbox-protocol/governance/contracts/market/ACL.sol " ;
1414import {ContractsRegister} from "@gearbox-protocol/governance/contracts/market/ContractsRegister.sol " ;
1515
16+ contract LossPolicy {
17+ uint256 public constant version = 3_10 ;
18+ }
19+
1620/// @dev Extremely dumbed-down version of `MarketConfiguratorLegacy` that is just enough to let compressors work
1721contract MarketConfigurator {
1822 string public name;
@@ -22,8 +26,8 @@ contract MarketConfigurator {
2226
2327 constructor (string memory name_ , address acl_ , address contractsRegister_ , address treasury_ ) {
2428 name = name_;
25- acl = acl_ ;
26- contractsRegister = address (new ContractsRegister (address ( new ACL ()) ));
29+ acl = address ( new ACL ()) ;
30+ contractsRegister = address (new ContractsRegister (acl ));
2731 treasury = treasury_;
2832
2933 address [] memory pools = IContractsRegisterLegacy (contractsRegister_).getPools ();
@@ -38,7 +42,7 @@ contract MarketConfigurator {
3842
3943 address priceOracle = _priceOracle (creditManagers[0 ]);
4044 // NOTE: v3.0.x contracts don't have loss policies set so we don't bother with them here
41- address lossPolicy = address (1 );
45+ address lossPolicy = address (new LossPolicy () );
4246
4347 ContractsRegister (contractsRegister).registerMarket (pool, priceOracle, lossPolicy);
4448 for (uint256 j; j < numCreditManagers; ++ j) {
@@ -58,8 +62,4 @@ contract MarketConfigurator {
5862 function _priceOracle (address creditManager ) internal view returns (address ) {
5963 return ICreditManagerV3 (creditManager).priceOracle ();
6064 }
61-
62- function _lossLiquidator (address creditManager ) internal view returns (address ) {
63- return ICreditFacadeV3 (ICreditManagerV3 (creditManager).creditFacade ()).lossLiquidator ();
64- }
6565}
0 commit comments