TermPriceConsumerV3.sol

This contract operates at the protocol level and governs all instances of a Term Repo. This contract is a centralized price oracle contract that feeds pricing data to all Term Repos.

TermPriceConsumerV3

This contract is a centralized price oracle contract that feeds pricing data to all Term Repos

This contract operates at the protocol level and governs all instances of a Term Repo

DEVOPS_ROLE

bytes32 DEVOPS_ROLE

priceFeeds

mapping(address => struct TermPriceFeedConfig) priceFeeds

fallbackPriceFeeds

mapping(address => struct TermPriceFeedConfig) fallbackPriceFeeds

constructor

constructor() public

initialize

function initialize(address devopsWallet_) external

Intializes with an array of token addresses, followed with an array of Chainlink aggregator addresses https://docs.chain.link/docs/ethereum-addresses/

addNewTokenPriceFeedAndFallbackPriceFeed

function addNewTokenPriceFeedAndFallbackPriceFeed(address token, address tokenPriceAggregator, uint256 tokenPriceAggregatorRefreshRateThreshold, address fallbackPriceAggregator, uint256 fallbackPriceAggregatorRefreshRateThreshold) external

Parameters

addNewTokenPriceFeed

function addNewTokenPriceFeed(address token, address tokenPriceAggregator, uint256 refreshRateThreshold) external

Parameters

addNewTokenFallbackPriceFeed

function addNewTokenFallbackPriceFeed(address token, address tokenPriceAggregator, uint256 refreshRateThreshold) external

Parameters

removeTokenPriceFeed

function removeTokenPriceFeed(address token) external

Parameters

removeFallbackTokenPriceFeed

function removeFallbackTokenPriceFeed(address token) external

Parameters

usdValueOfTokens

function usdValueOfTokens(address token, uint256 amount) external view returns (struct ExponentialNoError.Exp)

A function to return current market value given a token address and an amount

Parameters

Return Values

_addNewTokenPriceFeed

function _addNewTokenPriceFeed(address token, address tokenPriceAggregator, uint256 refreshRateThreshold) internal

Parameters

_addNewTokenFallbackPriceFeed

function _addNewTokenFallbackPriceFeed(address token, address tokenPriceAggregator, uint256 refreshRateThreshold) internal

Parameters

_getLatestPrice

function _getLatestPrice(address token) internal view returns (int256, uint8)

Return Values

_authorizeUpgrade

function _authorizeUpgrade(address) internal view

required override by the OpenZeppelin UUPS module

Last updated