We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 081af65 + efbc65e commit 9ed1932Copy full SHA for 9ed1932
src/libraries/ChainlinkDataFeedLib.sol
@@ -12,6 +12,10 @@ import {ErrorsLib} from "./ErrorsLib.sol";
12
library ChainlinkDataFeedLib {
13
/// @dev Performs safety checks and returns the latest price of a `feed`.
14
/// @dev When `feed` is the address zero, returns 1.
15
+ /// @dev Notes on safety checks:
16
+ /// - Staleness is not checked because it's assumed that the Chainlink feed keeps its promises on this.
17
+ /// - The price is not checked to be in the min/max bounds because it's assumed that the Chainlink feed keeps its
18
+ /// promises on this.
19
function getPrice(AggregatorV3Interface feed) internal view returns (uint256) {
20
if (address(feed) == address(0)) return 1;
21
0 commit comments