↪ oracles

HyperlendOracle

Contract for obtaining asset prices and managing price sources.

The source code is available on GitHub.

This contract is governed by Hyperlend Governance.


View Methods

getAssetPrice

solidityCopy codefunction getAssetPrice(address asset) public view override returns (uint256)

Retrieves the price of the supported asset in the BASE_CURRENCY of the Hyperlend Market, denominated in wei.

Input Parameters:

Name
Type
Description

asset

address

The address of the asset

Return Values:

Type
Description

uint256

The price of the asset in the BASE_CURRENCY of Hyperlend Market in wei


getAssetsPrices

solidityCopy codefunction getAssetsPrices(address[] calldata assets) external view override returns (uint256[] memory)

Retrieves a list of prices for a given list of supported assets in the BASE_CURRENCY of the Hyperlend Market. All prices are denominated in wei.

Input Parameters:

Name
Type
Description

assets

address[]

The list of asset addresses to query prices for

Return Values:

Type
Description

uint256[]

The prices of the specified assets in the BASE_CURRENCY of Hyperlend Market in wei


getSourceOfAsset

solidityCopy codefunction getSourceOfAsset(address asset) external view override returns (address)

Returns the address of the price source for a specific asset.

Input Parameters:

Name
Type
Description

asset

address

The address of the asset

Return Values:

Type
Description

address

The address of the price source


getFallbackOracle

solidityCopy codefunction getFallbackOracle() external view returns (address)

Retrieves the address of the fallback oracle.

Return Values:

Type
Description

address

The address of the fallback oracle

Last updated