Skip to main content

MockOracleRouter

MockOracleRouter​

FeedMetadata​

struct FeedMetadata {
address feedAddress;
uint256 maxStaleness;
}

assetToFeedMetadata​

mapping(address => struct MockOracleRouter.FeedMetadata) assetToFeedMetadata

setFeed​

function setFeed(address _asset, address _feed, uint256 _maxStaleness) external

getDecimals​

function getDecimals(address _feed) internal view returns (uint8)

feedMetadata​

function feedMetadata(address asset) internal view returns (address feedAddress, uint256 maxStaleness)

The price feed contract to use for a particular asset along with maximum data staleness

Parameters​

NameTypeDescription
assetaddressaddress of the asset

Return Values​

NameTypeDescription
feedAddressaddressaddress of the price feed for the asset
maxStalenessuint256maximum acceptable data staleness duration