Price Provider
Methods
changeActive
function changeActive(address token, bool active) external nonpayable
Parameters
token
address
undefined
active
bool
undefined
getEvaluation
function getEvaluation(address token, uint256 tokenAmount) external view returns (uint256 evaluation)
Parameters
token
address
undefined
tokenAmount
uint256
undefined
Returns
evaluation
uint256
undefined
getEvaluationSigned
function getEvaluationSigned(address token, uint256 tokenAmount, uint256 priceMantissa, uint256 validTo, bytes signature) external view returns (uint256 evaluation)
return the evaluation in $ of tokenAmount
with signed price
Parameters
token
address
the address of token to get evaluation in $
tokenAmount
uint256
the amount of token to get evaluation. Amount is scaled by 10 in power token decimals
priceMantissa
uint256
the price multiplied by priceDecimals. The dimension of priceMantissa should be $/token
validTo
uint256
the timestamp in seconds, when price is gonna be not valid.
signature
bytes
the ECDSA sign on eliptic curve secp256k1.
Returns
evaluation
uint256
undefined
getPrice
function getPrice(address token) external view returns (uint256 priceMantissa, uint8 priceDecimals)
Parameters
token
address
undefined
Returns
priceMantissa
uint256
undefined
priceDecimals
uint8
undefined
getPriceDecimals
function getPriceDecimals() external view returns (uint8 priceDecimals)
Returns
priceDecimals
uint8
undefined
getPriceSigned
function getPriceSigned(address token, uint256 priceMantissa, uint256 validTo, bytes signature) external view returns (uint256 _priceMantissa, uint8 _priceDecimals)
Parameters
token
address
undefined
priceMantissa
uint256
undefined
validTo
uint256
undefined
signature
bytes
undefined
Returns
_priceMantissa
uint256
undefined
_priceDecimals
uint8
undefined
isActive
function isActive(address token) external view returns (bool)
Parameters
token
address
undefined
Returns
_0
bool
undefined
isListed
function isListed(address token) external view returns (bool)
Parameters
token
address
undefined
Returns
_0
bool
undefined
Last updated