IPriceProviderAggregator

Overview

License: MIT

interface IPriceProviderAggregator

Functions info

setTokenAndPriceProvider (0x3ca82a11)

function setTokenAndPriceProvider(
    address token,
    address priceProvider,
    bool hasFunctionWithSign
) external

Sets price provider to token and its corresponding price provider.

Parameters:

changeActive (0x3651084e)

function changeActive(
    address priceProvider,
    address token,
    bool active
) external

Allows the moderator to change the active status of a price provider for a specific token.

Parameters:

getPrice (0x41976e09)

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

returns tuple (priceMantissa, priceDecimals). price = priceMantissa / (10 ** priceDecimals)

Parameters:

getPriceSigned (0x52bd8224)

function getPriceSigned(
    address token,
    uint256 _priceMantissa,
    uint8 _priceDecimals,
    uint256 validTo,
    bytes memory signature
) external view returns (uint256 priceMantissa, uint8 priceDecimals)

returns the price of token multiplied by 10 ** priceDecimals given by price provider. price can be calculated as priceMantissa / (10 ** priceDecimals). i.e. price = priceMantissa / (10 ** priceDecimals).

Parameters:

getEvaluation (0x81fd01ea)

function getEvaluation(
    address token,
    uint256 tokenAmount
) external view returns (uint256 evaluation)

Returns the USD evaluation of token by its tokenAmount.

Parameters:

getEvaluationSigned (0xf91b9dc2)

function getEvaluationSigned(
    address token,
    uint256 tokenAmount,
    uint256 priceMantissa,
    uint8 priceDecimals,
    uint256 validTo,
    bytes memory signature
) external view returns (uint256 evaluation)

Returns the USD evaluation of token by its tokenAmount.

Parameters:

updatePrices (0x0aa9adbc)

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

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

Parameters:

Last updated