Chainlink Price Provider
Last updated
Last updated
Chainlink price provider
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
returns the equivalent amount in USD
return the evaluation in $ of tokenAmount
with signed price
Returns the latest asset price mantissa and price decimals[price] = USD/token
First step is get priceMantissa with priceDecimals by this formula: price = 1 * 10 ** tokenDecimals * (chainlinkPrice_1 / 10 ** priceDecimals_1) * ... * (chainlinkPrice_n / 10 ** priceDecimals_n) = = 10 ** tokenDecimals (chainlinkPrice_1 * ... * chainlinkPrice_n) / 10 ** (priceDecimals_1 + ... + priceDecimals_n) Second step is scale priceMantissa to usdDecimals
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Grants role
to account
. If account
had not been already granted role
, emits a {RoleGranted} event. Requirements: - the caller must have role
's admin role.
Returns true
if account
has been granted role
.
Revokes role
from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must be account
.
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
See {IERC165-supportsInterface}.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_0
bytes32
undefined
_0
string
undefined
_0
bytes32
undefined
_0
address
undefined
isActive
bool
undefined
token
address
undefined
active
bool
undefined
token
address
the address of token
tokenAmount
uint256
the amount of token
evaluation
uint256
undefined
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.
evaluation
uint256
undefined
token
address
the token address
priceMantissa
uint256
undefined
priceDecimals
uint8
undefined
_0
uint8
undefined
token
address
undefined
priceMantissa
uint256
undefined
validTo
uint256
undefined
signature
bytes
undefined
_priceMantissa
uint256
undefined
_priceDecimals
uint8
undefined
role
bytes32
undefined
_0
bytes32
undefined
newModerator
address
undefined
role
bytes32
undefined
account
address
undefined
role
bytes32
undefined
account
address
undefined
_0
bool
undefined
token
address
undefined
_0
bool
undefined
token
address
undefined
_0
bool
undefined
role
bytes32
undefined
account
address
undefined
moderator
address
undefined
role
bytes32
undefined
account
address
undefined
token
address
undefined
aggregatorPath
address[]
undefined
interfaceId
bytes4
undefined
_0
bool
undefined
_0
uint8
undefined
who indexed
address
undefined
token indexed
address
undefined
active
bool
undefined
who indexed
address
undefined
newModerator indexed
address
undefined
who indexed
address
undefined
moderator indexed
address
undefined
role indexed
bytes32
undefined
previousAdminRole indexed
bytes32
undefined
newAdminRole indexed
bytes32
undefined
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
who indexed
address
undefined
token indexed
address
undefined
aggeregatorPath
address[]
undefined