• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

delvtech / hyperdrive / 9927927593

14 Jul 2024 12:26PM UTC coverage: 92.277%. First build
9927927593

Pull #1081

github

web-flow
Merge e5af82277 into 683f2f7cd
Pull Request #1081: Added an Aave integration

120 of 142 new or added lines in 33 files covered. (84.51%)

2115 of 2292 relevant lines covered (92.28%)

376654.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/contracts/src/instances/reth/RETHConversions.sol
1
// SPDX-License-Identifier: Apache-2.0
2
pragma solidity 0.8.20;
3

4
import { IERC20 } from "../../interfaces/IERC20.sol";
5
import { IRocketTokenRETH } from "../../interfaces/IRocketTokenRETH.sol";
6

7
/// @author DELV
8
/// @title RETHConversions
9
/// @notice The conversion logic for the RETH integration.
10
/// @custom:disclaimer The language used in this code is for coding convenience
11
///                    only, and is not intended to, and does not, have any
12
///                    particular legal or regulatory significance.
13
library RETHConversions {
14
    /// @dev Convert an amount of vault shares to an amount of base.
15
    /// @param _vaultSharesToken The vault shares asset.
16
    /// @param _shareAmount The vault shares amount.
17
    /// @return The base amount.
18
    function convertToBase(
19
        IERC20 _vaultSharesToken,
20
        uint256 _shareAmount
21
    ) internal view returns (uint256) {
22
        return
21✔
23
            IRocketTokenRETH(address(_vaultSharesToken)).getEthValue(
21✔
24
                _shareAmount
25
            );
26
    }
27

28
    /// @dev Convert an amount of base to an amount of vault shares.
29
    /// @param _vaultSharesToken The vault shares asset.
30
    /// @param _baseAmount The base amount.
31
    /// @return The vault shares amount.
32
    function convertToShares(
33
        IERC20 _vaultSharesToken,
34
        uint256 _baseAmount
35
    ) internal view returns (uint256) {
NEW
36
        return
×
NEW
37
            IRocketTokenRETH(address(_vaultSharesToken)).getRethValue(
×
38
                _baseAmount
39
            );
40
    }
41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc