Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

view - return configured chainlink price feed address #170

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions contracts/views/EulerGeneralView.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ contract EulerGeneralView is Constants {
uint16 pricingType;
uint32 pricingParameters;
address pricingForwarded;
address chainlinkPriceFeed;

// Account specific

Expand Down Expand Up @@ -167,6 +168,7 @@ contract EulerGeneralView is Constants {

(m.twap, m.twapPeriod, m.currPrice) = execProxy.getPriceFull(m.underlying);
(m.pricingType, m.pricingParameters, m.pricingForwarded) = marketsProxy.getPricingConfig(m.underlying);
m.chainlinkPriceFeed = marketsProxy.getChainlinkPriceFeedConfig(m.underlying);

if (q.account == address(0)) return;

Expand Down
5 changes: 5 additions & 0 deletions contracts/views/EulerSimpleLens.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ contract EulerSimpleLens is Constants {
(pricingType, pricingParameters, pricingForwarded) = markets.getPricingConfig(underlying);
}

// underlying -> chainlink price feed
function getChainlinkPriceFeedConfig(address underlying) external view returns (address chainlinkPriceFeed) {
chainlinkPriceFeed = markets.getChainlinkPriceFeedConfig(underlying);
}

// entered markets
function getEnteredMarkets(address account) external view returns (address[] memory) {
return markets.getEnteredMarkets(account);
Expand Down