Skip to content

Commit a666813

Browse files
MathisGDRubilmax
andauthored
docs: minor improvements
Co-authored-by: Romain Milon <[email protected]> Signed-off-by: MathisGD <[email protected]>
1 parent 3d88fd5 commit a666813

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/chainlink/libraries/DataFeedLib.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {ErrorsLib} from "./ErrorsLib.sol";
55
import {AggregatorV3Interface} from "../interfaces/AggregatorV3Interface.sol";
66

77
library DataFeedLib {
8-
/// @dev Performing some security checks and returns the latest price of a feed.
8+
/// @dev Performs some safety checks and returns the latest price of a feed.
99
/// @dev When `feed` is the address zero, returns 1.
1010
function getPrice(AggregatorV3Interface feed) internal view returns (uint256) {
1111
if (address(feed) == address(0)) return 1;
@@ -14,7 +14,8 @@ library DataFeedLib {
1414
return uint256(answer);
1515
}
1616

17-
/// @dev Returns `feed.decimals()` when `feed` is not the address zero, else returns 0.
17+
/// @dev Returns the number of decimals of a feed.
18+
/// @dev When `feed` is the address zero, returns 0.
1819
function getDecimals(AggregatorV3Interface feed) internal view returns (uint256) {
1920
if (address(feed) == address(0)) return 0;
2021
return feed.decimals();

0 commit comments

Comments
 (0)