Skip to content

Oracle

Functions

getAssetPrice

Returns the asset price in the base currency

solidity
function getAssetPrice(address asset) public view override returns (uint256);
function getAssetPrice(address asset) public view override returns (uint256);

Parameters

NameTypeDescription
assetaddressThe address of the asset

Returns

NameTypeDescription
<none>uint256The price of the asset

getAssetsPrices

Returns a list of prices from a list of assets addresses

solidity
function getAssetsPrices(address[] calldata assets) external view override returns (uint256[] memory);
function getAssetsPrices(address[] calldata assets) external view override returns (uint256[] memory);

Parameters

NameTypeDescription
assetsaddress[]The list of assets addresses

Returns

NameTypeDescription
<none>uint256[]The prices of the given assets

getSourceOfAsset

Returns the address of the source for an asset address

solidity
function getSourceOfAsset(address asset) external view override returns (address);
function getSourceOfAsset(address asset) external view override returns (address);

Parameters

NameTypeDescription
assetaddressThe address of the asset

Returns

NameTypeDescription
<none>addressThe address of the source

getFallbackOracle

Returns the address of the fallback oracle

solidity
function getFallbackOracle() external view returns (address);
function getFallbackOracle() external view returns (address);

Returns

NameTypeDescription
<none>addressThe address of the fallback oracle