Skip to content

Commit a5a3f13

Browse files
committed
Improve docs
1 parent 9e1e697 commit a5a3f13

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

contracts/WstETHApi3ReaderProxyV1.sol

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ pragma solidity ^0.8.27;
44
import "@api3/contracts/interfaces/IApi3ReaderProxy.sol";
55
import "./interfaces/IWstETH.sol";
66

7-
/// @title An immutable proxy contract that reads the price of wstETH/stETH
7+
/// @title An immutable proxy contract that reads the stETH per wstETH ratio
88
/// directly from the WstETH contract on Ethereum.
9-
/// @dev This contract implements only the IApi3ReaderProxy and not the
10-
/// AggregatorV2V3Interface which is usually implemented with Api3 proxies. The
11-
/// user of this contract needs to be aware of this and only use this contract
12-
/// where the IApi3ReaderProxy interface is expected.
9+
/// @dev This contract implements only the IApi3ReaderProxy interface and not the
10+
/// AggregatorV2V3Interface which is usually implemented by Api3 proxies. The
11+
/// user of this contract needs to be aware of this limitation and only use this
12+
/// contract where the IApi3ReaderProxy interface is expected.
1313
contract WstETHApi3ReaderProxyV1 is IApi3ReaderProxy {
1414
/// @notice The address of the wstETH contract on Ethereum mainnet.
1515
address public constant WST_ETH =
1616
0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0;
1717

1818
/// @inheritdoc IApi3ReaderProxy
19-
/// @dev The value returned by this function is the stETH value scaled to 18
20-
/// decimals. The timestamp returned is the current block timestamp.
19+
/// @dev Returns the stETH/wstETH exchange rate with 18 decimals precision.
20+
/// The timestamp returned is the current block timestamp.
2121
function read()
2222
public
2323
view

contracts/interfaces/IWstETH.sol

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.27;
33

4-
/// @title A minimal interface for the wstETH contract on Ethereum, used to read
5-
/// the stETH value per token value of 1 unit of wstETH.
6-
/// @dev The returned value is scaled to 18 decimals.
4+
/// @title A minimal interface for the wstETH contract on Ethereum
5+
/// @dev This interface only includes the stEthPerToken function needed to read
6+
/// the exchange rate between stETH and wstETH.
77
interface IWstETH {
8-
/// @return The stETH value per token value of 1 unit of wstETH, scaled to 18 decimals.
8+
/// @notice Returns the amount of stETH that corresponds to 1 wstETH
9+
/// @return The stETH/wstETH exchange rate with 18 decimals precision
910
function stEthPerToken() external view returns (uint256);
1011
}

0 commit comments

Comments
 (0)