diff --git a/src/contracts/extensions/v3-config-engine/AaveV3ConfigEngine.sol b/src/contracts/extensions/v3-config-engine/AaveV3ConfigEngine.sol index ed817352..3c9df057 100644 --- a/src/contracts/extensions/v3-config-engine/AaveV3ConfigEngine.sol +++ b/src/contracts/extensions/v3-config-engine/AaveV3ConfigEngine.sol @@ -187,10 +187,10 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { } /// @inheritdoc IAaveV3ConfigEngine - function updateAssetEMode(AssetEModeUpdate[] calldata updates) external { + function updateAssetsEMode(AssetEModeUpdate[] calldata updates) external { EMODE_ENGINE.functionDelegateCall( abi.encodeWithSelector( - EModeEngine.executeAssetEModeUpdate.selector, + EModeEngine.executeAssetsEModeUpdate.selector, _getEngineConstants(), updates ) diff --git a/src/contracts/extensions/v3-config-engine/AaveV3Payload.sol b/src/contracts/extensions/v3-config-engine/AaveV3Payload.sol index 8618056f..50ecc07a 100644 --- a/src/contracts/extensions/v3-config-engine/AaveV3Payload.sol +++ b/src/contracts/extensions/v3-config-engine/AaveV3Payload.sol @@ -49,7 +49,7 @@ abstract contract AaveV3Payload { IEngine.BorrowUpdate[] memory borrows = borrowsUpdates(); IEngine.RateStrategyUpdate[] memory rates = rateStrategiesUpdates(); IEngine.PriceFeedUpdate[] memory priceFeeds = priceFeedsUpdates(); - IEngine.AssetEModeUpdate[] memory assetEModes = assetEModeUpdates(); + IEngine.AssetEModeUpdate[] memory assetsEModes = assetsEModeUpdates(); IEngine.CapsUpdate[] memory caps = capsUpdates(); if (eModeCategories.length != 0) { @@ -98,9 +98,9 @@ abstract contract AaveV3Payload { ); } - if (assetEModes.length != 0) { + if (assetsEModes.length != 0) { address(CONFIG_ENGINE).functionDelegateCall( - abi.encodeWithSelector(CONFIG_ENGINE.updateAssetEMode.selector, assetEModes) + abi.encodeWithSelector(CONFIG_ENGINE.updateAssetsEMode.selector, assetsEModes) ); } @@ -152,7 +152,7 @@ abstract contract AaveV3Payload { {} /// @dev to be defined in the child with a list of assets for which eMode collateral to update - function assetEModeUpdates() public view virtual returns (IEngine.AssetEModeUpdate[] memory) {} + function assetsEModeUpdates() public view virtual returns (IEngine.AssetEModeUpdate[] memory) {} /// @dev to be defined in the child with a list of set of parameters of rate strategies function rateStrategiesUpdates() diff --git a/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol b/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol index cf745de6..500d7eb7 100644 --- a/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol +++ b/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol @@ -308,7 +308,7 @@ interface IAaveV3ConfigEngine { * @param updates `EModeCollateralUpdate[]` list of declarative updates containing the new parameters * More information on the documentation of the struct. */ - function updateAssetEMode(AssetEModeUpdate[] memory updates) external; + function updateAssetsEMode(AssetEModeUpdate[] calldata updates) external; function DEFAULT_INTEREST_RATE_STRATEGY() external view returns (address); diff --git a/src/contracts/extensions/v3-config-engine/libraries/EModeEngine.sol b/src/contracts/extensions/v3-config-engine/libraries/EModeEngine.sol index fd9c95e9..df2f72ab 100644 --- a/src/contracts/extensions/v3-config-engine/libraries/EModeEngine.sol +++ b/src/contracts/extensions/v3-config-engine/libraries/EModeEngine.sol @@ -11,13 +11,13 @@ library EModeEngine { using PercentageMath for uint256; using SafeCast for uint256; - function executeAssetEModeUpdate( + function executeAssetsEModeUpdate( IEngine.EngineConstants calldata engineConstants, IEngine.AssetEModeUpdate[] memory updates ) external { require(updates.length != 0, 'AT_LEAST_ONE_UPDATE_REQUIRED'); - _configAssetEMode(engineConstants.poolConfigurator, updates); + _configAssetsEMode(engineConstants.poolConfigurator, updates); } function executeEModeCategoriesUpdate( @@ -29,7 +29,7 @@ library EModeEngine { _configEModeCategories(engineConstants.poolConfigurator, engineConstants.pool, updates); } - function _configAssetEMode( + function _configAssetsEMode( IPoolConfigurator poolConfigurator, IEngine.AssetEModeUpdate[] memory updates ) internal { diff --git a/tests/extensions/v3-config-engine/mocks/AaveV3MockAssetEModeUpdate.sol b/tests/extensions/v3-config-engine/mocks/AaveV3MockAssetEModeUpdate.sol index 9a36644e..96220fc0 100644 --- a/tests/extensions/v3-config-engine/mocks/AaveV3MockAssetEModeUpdate.sol +++ b/tests/extensions/v3-config-engine/mocks/AaveV3MockAssetEModeUpdate.sol @@ -21,7 +21,7 @@ contract AaveV3MockAssetEModeUpdate is AaveV3Payload { ASSET_2_ADDRESS = asset2Address; } - function assetEModeUpdates() public view override returns (IEngine.AssetEModeUpdate[] memory) { + function assetsEModeUpdates() public view override returns (IEngine.AssetEModeUpdate[] memory) { IEngine.AssetEModeUpdate[] memory eModeUpdate = new IEngine.AssetEModeUpdate[](2); eModeUpdate[0] = IEngine.AssetEModeUpdate({