Skip to content

Commit

Permalink
fix: add getEModes to interface (aave-dao#46)
Browse files Browse the repository at this point in the history
fix: add inheritdoc
  • Loading branch information
sakulstra committed Sep 12, 2024
1 parent dbdb739 commit 740d0a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/contracts/helpers/UiPoolDataProviderV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ contract UiPoolDataProviderV3 is IUiPoolDataProviderV3 {
return (reservesData, baseCurrencyInfo);
}

/// @inheritdoc IUiPoolDataProviderV3
function getEModes(IPoolAddressesProvider provider) external view returns (Emode[] memory) {
IPool pool = IPool(provider.getPool());
Emode[] memory tempCategories = new Emode[](256);
Expand Down
7 changes: 7 additions & 0 deletions src/contracts/helpers/interfaces/IUiPoolDataProviderV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,11 @@ interface IUiPoolDataProviderV3 {
IPoolAddressesProvider provider,
address user
) external view returns (UserReserveData[] memory, uint8);

/**
* @dev Iterates the eModes mapping and returns all eModes found
* @notice The method assumes for id gaps <= 2 within the eMode definitions
* @return an array of eModes that were found in the eMode mapping
*/
function getEModes(IPoolAddressesProvider provider) external view returns (Emode[] memory);
}

0 comments on commit 740d0a8

Please sign in to comment.