I Price Provider Aggregator
Methods
MODERATOR_ROLE
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
changeActive
Parameters
Name | Type | Description |
---|---|---|
priceProvider | address | undefined |
token | address | undefined |
active | bool | undefined |
getEvaluation
returns the USD evaluation of token by its tokenAmount
Parameters
Name | Type | Description |
---|---|---|
token | address | the address of token to evaluate |
tokenAmount | uint256 | the amount of token to evaluate |
Returns
Name | Type | Description |
---|---|---|
evaluation | uint256 | undefined |
getEvaluationSigned
returns the USD evaluation of token by its tokenAmount
Parameters
Name | Type | Description |
---|---|---|
token | address | the address of token |
tokenAmount | uint256 | the amount of token including decimals |
priceMantissa | uint256 | - the price of token (used in verifying the signature) |
priceDecimals | uint8 | - the price decimals (used in verifying the signature) |
validTo | uint256 | - the timestamp in seconds (used in verifying the signature) |
signature | bytes | - the backend signature of secp256k1. length is 65 bytes |
Returns
Name | Type | Description |
---|---|---|
evaluation | uint256 | undefined |
getPrice
price = priceMantissa / (10 ** priceDecimals)
returns tuple (priceMantissa, priceDecimals)
Parameters
Name | Type | Description |
---|---|---|
token | address | the address of token wich price is to return |
Returns
Name | Type | Description |
---|---|---|
priceMantissa | uint256 | undefined |
priceDecimals | uint8 | undefined |
getPriceSigned
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
Name | Type | Description |
---|---|---|
token | address | the address of token |
_priceMantissa | uint256 | - the price of token (used in verifying the signature) |
_priceDecimals | uint8 | - the price decimals (used in verifying the signature) |
validTo | uint256 | - the timestamp in seconds (used in verifying the signature) |
signature | bytes | - the backend signature of secp256k1. length is 65 bytes |
Returns
Name | Type | Description |
---|---|---|
priceMantissa | uint256 | undefined |
priceDecimals | uint8 | undefined |
grandModerator
Parameters
Name | Type | Description |
---|---|---|
newModerator | address | undefined |
initialize
revokeModerator
Parameters
Name | Type | Description |
---|---|---|
moderator | address | undefined |
setTokenAndPriceProvider
Parameters
Name | Type | Description |
---|---|---|
token | address | undefined |
priceProvider | address | undefined |
hasFunctionWithSign | bool | undefined |
tokenPriceProvider
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | undefined |
Returns
Name | Type | Description |
---|---|---|
priceProvider | address | undefined |
hasSignedFunction | bool | undefined |
usdDecimals
Returns
Name | Type | Description |
---|---|---|
_0 | uint8 | undefined |
Events
ChangeActive
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
priceProvider | address | undefined |
token | address | undefined |
active | bool | undefined |
GrandModeratorRole
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
newModerator | address | undefined |
RevokeModeratorRole
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
moderator | address | undefined |
SetTokenAndPriceProvider
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
token | address | undefined |
priceProvider | address | undefined |
Last updated