PriceProvider

Overview

License: MIT

abstract contract PriceProvider

Abstract contract for a price provider that can be used by the PriceOracle contract.

Functions info

changeActive (0x258a4532)

function changeActive(address token, bool active) public virtual

Changes the active status of a token.

Parameters:

updatePrices (0x0aa9adbc)

function updatePrices(
    bytes32[] memory priceIds,
    bytes[] calldata updateData
) external payable virtual

Performs a price update if the price is no longer valid.

Parameters:

isActive (0x9f8a13d7)

function isActive(address token) public view virtual returns (bool)

Returns whether a token is active or not.

Parameters:

Return values:

isListed (0xf794062e)

function isListed(address token) public view virtual returns (bool)

Returns a boolean indicating whether the given token address is listed in the price provider.

Parameters:

Return values:

getPrice (0x41976e09)

function getPrice(
    address token
) public view virtual returns (uint256 priceMantissa, uint8 priceDecimals)

Returns the price of the specified token.

Parameters:

Return values:

getPriceDecimals (0x1b30aafc)

function getPriceDecimals() public view virtual returns (uint8 priceDecimals)

Returns the number of decimal places for the price returned by the price provider.

Return values:

getExpiredPriceFeeds (0xe1f67b13)

function getExpiredPriceFeeds(
    address[] memory token,
    uint256 timeBeforeExpiration
) external view virtual returns (bytes32[] memory priceIds, uint256 updateFee)

Returns the expired price feeds for the given tokens and time before expiration.

Parameters:

Return values:

Last updated