@@ -61,6 +61,7 @@ interface IAddressProviderV3Legacy {
6161}
6262
6363address constant emergencyLiquidator = 0x7BD9c8161836b1F402233E80F55E3CaE0Fde4d87 ;
64+ address constant PUBLIC_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C ;
6465
6566contract Migrate is Script {
6667 using LibString for bytes32 ;
@@ -156,7 +157,9 @@ contract Migrate is Script {
156157 bytes memory parameters = abi.encode (oldAddressProvider, address (_addressProvider), "ChaosLabs " , vetoAdmin);
157158
158159 bytes memory bytecodeWithParams = abi.encodePacked (bytecode, parameters);
159- address mcl = Create2.computeAddress (0 , keccak256 (bytecodeWithParams));
160+ address mcl = Create2.computeAddress (0 , keccak256 (bytecodeWithParams), PUBLIC_FACTORY);
161+
162+ console.log ("MarketConfiguratorLegacy: " , mcl);
160163
161164 /// set this contract to add mcl as marketConfigurator
162165 _addressProvider.setAddress (AP_MARKET_CONFIGURATOR_FACTORY.fromSmallString (), deployer, false );
@@ -165,7 +168,8 @@ contract Migrate is Script {
165168 _addressProvider.addMarketConfigurator (address (mcl));
166169
167170 /// Deploy MarketConfiguratorLegacy
168- Create2.deploy (0 , 0 , bytecodeWithParams);
171+ address pp = Create2.deploy (0 , 0 , bytecodeWithParams);
172+ console.log ("MarketConfiguratorLegacy deployed at: " , pp);
169173
170174 factory = address (new MarketConfiguratorFactoryV3 (address (_addressProvider)));
171175 _addressProvider.setAddress (factory, false );
0 commit comments