Skip to main content

IAaveOracle

IAaveOracle​

Defines the basic interface for the Aave Oracle

BaseCurrencySet​

event BaseCurrencySet(address baseCurrency, uint256 baseCurrencyUnit)

Emitted after the base currency is set

Parameters​

NameTypeDescription
baseCurrencyaddressThe base currency of used for price quotes
baseCurrencyUnituint256The unit of the base currency

AssetSourceUpdated​

event AssetSourceUpdated(address asset, address source)

Emitted after the price source of an asset is updated

Parameters​

NameTypeDescription
assetaddressThe address of the asset
sourceaddressThe price source of the asset

FallbackOracleUpdated​

event FallbackOracleUpdated(address fallbackOracle)

Emitted after the address of fallback oracle is updated

Parameters​

NameTypeDescription
fallbackOracleaddressThe address of the fallback oracle

ADDRESSES_PROVIDER​

function ADDRESSES_PROVIDER() external view returns (contract IPoolAddressesProvider)

Returns the PoolAddressesProvider

Return Values​

NameTypeDescription
[0]contract IPoolAddressesProviderThe address of the PoolAddressesProvider contract

setAssetSources​

function setAssetSources(address[] assets, address[] sources) external

Sets or replaces price sources of assets

Parameters​

NameTypeDescription
assetsaddress[]The addresses of the assets
sourcesaddress[]The addresses of the price sources

setFallbackOracle​

function setFallbackOracle(address fallbackOracle) external

Sets the fallback oracle

Parameters​

NameTypeDescription
fallbackOracleaddressThe address of the fallback oracle

getAssetsPrices​

function getAssetsPrices(address[] assets) external view returns (uint256[])

Returns a list of prices from a list of assets addresses

Parameters​

NameTypeDescription
assetsaddress[]The list of assets addresses

Return Values​

NameTypeDescription
[0]uint256[]The prices of the given assets

getSourceOfAsset​

function getSourceOfAsset(address asset) external view returns (address)

Returns the address of the source for an asset address

Parameters​

NameTypeDescription
assetaddressThe address of the asset

Return Values​

NameTypeDescription
[0]addressThe address of the source

getFallbackOracle​

function getFallbackOracle() external view returns (address)

Returns the address of the fallback oracle

Return Values​

NameTypeDescription
[0]addressThe address of the fallback oracle