@@ -5,7 +5,7 @@ import '../src/ScriptUtils.sol';
55import {AaveV3ConfigEngine as Engine} from '../src/v3-config-engine/AaveV3ConfigEngine.sol ' ;
66import {IAaveV3ConfigEngine as IEngine} from '../src/v3-config-engine/IAaveV3ConfigEngine.sol ' ;
77import {IV3RateStrategyFactory} from '../src/v3-config-engine/IV3RateStrategyFactory.sol ' ;
8- import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol ' ;
8+ import {AaveV3Ethereum, IPool, IPoolConfigurator, IAaveOracle } from 'aave-address-book/AaveV3Ethereum.sol ' ;
99import {AaveV3BNB} from 'aave-address-book/AaveV3BNB.sol ' ;
1010import {AaveV3PolygonZkEvm} from 'aave-address-book/AaveV3PolygonZkEvm.sol ' ;
1111import {AaveV3Optimism} from 'aave-address-book/AaveV3Optimism.sol ' ;
@@ -15,6 +15,7 @@ import {AaveV3Avalanche} from 'aave-address-book/AaveV3Avalanche.sol';
1515import {AaveV3Metis} from 'aave-address-book/AaveV3Metis.sol ' ;
1616import {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol ' ;
1717import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol ' ;
18+ import {AaveV3Scroll} from 'aave-address-book/AaveV3Scroll.sol ' ;
1819import {CapsEngine} from '../src/v3-config-engine/libraries/CapsEngine.sol ' ;
1920import {BorrowEngine} from '../src/v3-config-engine/libraries/BorrowEngine.sol ' ;
2021import {CollateralEngine} from '../src/v3-config-engine/libraries/CollateralEngine.sol ' ;
@@ -320,6 +321,40 @@ library DeployEngineBnbLib {
320321 }
321322}
322323
324+ library DeployEngineScrollLib {
325+ function deploy () internal returns (address ) {
326+ IEngine.EngineLibraries memory engineLibraries = IEngine.EngineLibraries ({
327+ listingEngine: Create2Utils.create2Deploy ('v1 ' , type (ListingEngine).creationCode),
328+ eModeEngine: Create2Utils.create2Deploy ('v1 ' , type (EModeEngine).creationCode),
329+ borrowEngine: Create2Utils.create2Deploy ('v1 ' , type (BorrowEngine).creationCode),
330+ collateralEngine: Create2Utils.create2Deploy ('v1 ' , type (CollateralEngine).creationCode),
331+ priceFeedEngine: Create2Utils.create2Deploy ('v1 ' , type (PriceFeedEngine).creationCode),
332+ rateEngine: Create2Utils.create2Deploy ('v1 ' , type (RateEngine).creationCode),
333+ capsEngine: Create2Utils.create2Deploy ('v1 ' , type (CapsEngine).creationCode)
334+ });
335+ IEngine.EngineConstants memory engineConstants = IEngine.EngineConstants ({
336+ pool: AaveV3Scroll.POOL,
337+ poolConfigurator: AaveV3Scroll.POOL_CONFIGURATOR,
338+ ratesStrategyFactory: IV3RateStrategyFactory (AaveV3Scroll.RATES_FACTORY),
339+ oracle: AaveV3Scroll.ORACLE,
340+ rewardsController: AaveV3Scroll.DEFAULT_INCENTIVES_CONTROLLER,
341+ collector: address (AaveV3Scroll.COLLECTOR)
342+ });
343+
344+ return
345+ address (
346+ new Engine (
347+ AaveV3Scroll.DEFAULT_A_TOKEN_IMPL_REV_1,
348+ AaveV3Scroll.DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_1,
349+ AaveV3Scroll.DEFAULT_STABLE_DEBT_TOKEN_IMPL_REV_1,
350+ engineConstants,
351+ engineLibraries
352+ )
353+ );
354+ }
355+ }
356+
357+
323358library DeployEngineZkEvmLib {
324359 function deploy () internal returns (address ) {
325360 IEngine.EngineLibraries memory engineLibraries = IEngine.EngineLibraries ({
@@ -407,6 +442,12 @@ contract DeployEngineBnb is BNBScript {
407442 }
408443}
409444
445+ contract DeployEngineScroll is ScrollScript {
446+ function run () external broadcast {
447+ DeployEngineScrollLib.deploy ();
448+ }
449+ }
450+
410451contract DeployEngineZkEvm is PolygonZkEvmScript {
411452 function run () external broadcast {
412453 DeployEngineZkEvmLib.deploy ();
0 commit comments