Skip to content

Commit 7d8d321

Browse files
committed
docs: fix and add missing natspecs
1 parent 5d2a173 commit 7d8d321

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/wsteth-exchange-rate-adapter/WstEthStEthExchangeRateChainlinkAdapter.sol

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ import {MinimalAggregatorV3Interface} from "./interfaces/MinimalAggregatorV3Inte
88
/// @author Morpho Labs
99
/// @custom:contact security@morpho.org
1010
/// @notice wstETH/stETH exchange rate price feed.
11-
/// @dev This contract should only be used as price feed for `ChainlinkOracle`.
11+
/// @dev This contract should only be used as price feed for `MorphoChainlinkOracleV2`.
1212
contract WstEthStEthExchangeRateChainlinkAdapter is MinimalAggregatorV3Interface {
13+
/// @inheritdoc MinimalAggregatorV3Interface
1314
uint8 public constant decimals = 18;
15+
16+
/// @notice The description of the price feed.
1417
string public constant description = "wstETH/stETH exchange rate";
18+
19+
/// @notice The address of stETH on Mainnet.
1520
IStEth public constant ST_ETH = IStEth(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);
1621

22+
/// @inheritdoc MinimalAggregatorV3Interface
1723
/// @dev Silently overflows if `getPooledEthByShares`'s return value is greater than `type(int256).max`.
1824
function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80) {
1925
// It is assumed that `getPooledEthByShares` returns a price with 18 decimals precision.

src/wsteth-exchange-rate-adapter/interfaces/MinimalAggregatorV3Interface.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ pragma solidity >=0.5.0;
33

44
/// @dev Inspired by
55
/// https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol
6+
/// @dev This is the minimal feed interface required by `MorphoChainlinkOracleV2`.
67
interface MinimalAggregatorV3Interface {
8+
/// @notice Returns the number of decimals precision.
79
function decimals() external view returns (uint8);
810

11+
/// @notice Returns Chainlink's `latestRoundData` return values.
12+
/// @notice Only the `answer` field is used by `MorphoChainlinkOracleV2`.
913
function latestRoundData()
1014
external
1115
view

0 commit comments

Comments
 (0)