From 11ef02c8fabb39556ccf35986b26b49e9696fba4 Mon Sep 17 00:00:00 2001 From: Harsh Pandey Date: Wed, 25 Oct 2023 19:36:38 +0530 Subject: [PATCH] fix: v2 v3 engine rates import generator --- generator/features/rateUpdates.ts | 4 ++-- generator/utils/importsResolver.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generator/features/rateUpdates.ts b/generator/features/rateUpdates.ts index 76cf71999..a46717a3f 100644 --- a/generator/features/rateUpdates.ts +++ b/generator/features/rateUpdates.ts @@ -94,7 +94,7 @@ export const rateUpdatesV2: FeatureModule = { .map( (cfg, ix) => `rateStrategies[${ix}] = IAaveV2ConfigEngine.RateStrategyUpdate({ asset: ${cfg.asset}, - params: Rates.RateStrategyParams({ + params: IV2RateStrategyFactory.RateStrategyParams({ optimalUtilizationRate: ${cfg.params.optimalUtilizationRate}, baseVariableBorrowRate: ${cfg.params.baseVariableBorrowRate}, variableRateSlope1: ${cfg.params.variableRateSlope1}, @@ -149,7 +149,7 @@ export const rateUpdatesV3: FeatureModule = { .map( (cfg, ix) => `rateStrategies[${ix}] = IAaveV3ConfigEngine.RateStrategyUpdate({ asset: ${cfg.asset}, - params: Rates.RateStrategyParams({ + params: IV3RateStrategyFactory.RateStrategyParams({ optimalUsageRatio: ${cfg.params.optimalUtilizationRate}, baseVariableBorrowRate: ${cfg.params.baseVariableBorrowRate}, variableRateSlope1: ${cfg.params.variableRateSlope1}, diff --git a/generator/utils/importsResolver.ts b/generator/utils/importsResolver.ts index 3750ff78c..da10361c8 100644 --- a/generator/utils/importsResolver.ts +++ b/generator/utils/importsResolver.ts @@ -83,8 +83,8 @@ export function prefixWithImports(code: string) { if (findMatch(code, 'IAaveV3ConfigEngine')) { imports += `import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';\n`; } - if (findMatch(code, 'Rates')) { - imports += `import {IV3RateStrategyFactory as Rates} from 'aave-helpers/v3-config-engine/IV3RateStrategyFactory.sol';\n`; + if (findMatch(code, 'IV3RateStrategyFactory')) { + imports += `import {IV3RateStrategyFactory} from 'aave-helpers/v3-config-engine/IV3RateStrategyFactory.sol';\n`; } // v2 config engine imports if (findMatch(code, 'IAaveV2ConfigEngine')) {