MasterPriceOracle
Last updated
Was this helpful?
Last updated
Was this helpful?
Inherits: Ownable, IOracle
Author: Sperax Foundation
Communicates with different price feeds to get the price
Store price feed data for tokens.
Add/Update price feed for _token
Have to be extra cautious while updating the price feed.
Parameters
_token
address
address of the desired token.
_source
address
price feed source.
_data
bytes
call data for fetching the price feed.
Remove an existing price feed for _token
.
Parameters
_token
address
address of the token.
Gets the price feed for _token
.
Function reverts if the price feed does not exists.
Parameters
_token
address
address of the desired token.
Returns
PriceData
(uint256 price, uint256 precision).
Validates if price feed exists for a _token
Function reverts if price feed not set.
Parameters
_token
address
address of the desired token.
Returns
bool
bool if price feed exists.
Gets the price feed for a _token
given the feed data.
Parameters
_token
address
address of the desired token.
_source
address
price feed source.
_msgData
bytes
call data for fetching feed.
Returns
priceData
PriceData
(uint256 price, uint256 precision).