Skip to content

Commit

Permalink
Merge pull request #156 from aave/feat/155-IPriceOracleGetter_update
Browse files Browse the repository at this point in the history
fix: added public vars to interface for periphery usage
  • Loading branch information
kartojal authored Oct 18, 2021
2 parents e7840a4 + 7965e0e commit 1522d22
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions contracts/interfaces/IPriceOracleGetter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ pragma solidity 0.8.7;
* @notice Interface for the Aave price oracle.
**/
interface IPriceOracleGetter {
/**
* @notice Returns the base currency address
* @return Returns the base currency address. MOCK_USD_ADDRESS if usd market
**/
function BASE_CURRENCY() external view returns (address);

/**
* @notice Returns the base currency unit
* @return Returns the base currency unit. 1 ether if eth market and 100000000 if usd market
**/
function BASE_CURRENCY_UNIT() external view returns (uint256);

/**
* @notice Returns the asset price in the base currency
* @param asset The address of the asset
Expand Down
4 changes: 2 additions & 2 deletions contracts/misc/AaveOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ contract AaveOracle is IPriceOracleGetter {
IPoolAddressesProvider internal _addressesProvider;
mapping(address => IChainlinkAggregator) private assetsSources;
IPriceOracleGetter private _fallbackOracle;
address public immutable BASE_CURRENCY;
uint256 public immutable BASE_CURRENCY_UNIT;
address public immutable override BASE_CURRENCY;
uint256 public immutable override BASE_CURRENCY_UNIT;

modifier onlyAssetListingOrPoolAdmins() {
_onlyAssetListingOrPoolAdmins();
Expand Down

0 comments on commit 1522d22

Please sign in to comment.