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

delvtech / hyperdrive / 10637797741

30 Aug 2024 06:57PM UTC coverage: 89.37%. First build
10637797741

Pull #1152

github

web-flow
Merge 1e72dcbdc into 9857eb6ef
Pull Request #1152: RsETH on Linea

43 of 64 new or added lines in 10 files covered. (67.19%)

2354 of 2634 relevant lines covered (89.37%)

347620.55 hits per line

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

50.0
/contracts/src/deployers/rseth-linea/RsETHLineaHyperdriveCoreDeployer.sol
1
// SPDX-License-Identifier: Apache-2.0
2
pragma solidity 0.8.22;
3

4
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
5
import { IHyperdriveAdminController } from "../../interfaces/IHyperdriveAdminController.sol";
6
import { IHyperdriveCoreDeployer } from "../../interfaces/IHyperdriveCoreDeployer.sol";
7
import { IRSETHPoolV2 } from "../../interfaces/IRSETHPoolV2.sol";
8
import { RsETHLineaHyperdrive } from "../../instances/rseth-linea/RsETHLineaHyperdrive.sol";
9

10
// FIXME: Update the Natspec.
11
//
12
/// @author DELV
13
/// @title RsETHLineaHyperdriveCoreDeployer
14
/// @notice The core deployer for the RsETHLineaHyperdrive implementation.
15
/// @custom:disclaimer The language used in this code is for coding convenience
16
///                    only, and is not intended to, and does not, have any
17
///                    particular legal or regulatory significance.
18
contract RsETHLineaHyperdriveCoreDeployer is IHyperdriveCoreDeployer {
19
    /// @notice The Kelp DAO deposit contract on Linea. The rsETH/ETH price is
20
    ///         used as the vault share price.
21
    IRSETHPoolV2 public immutable rsETHPool;
22

23
    /// @notice Instantiates the rsETH Linea Hyperdrive base contract.
24
    /// @param _rsETHPool The Kelp DAO deposit contract that provides the vault
25
    ///        share price.
26
    constructor(IRSETHPoolV2 _rsETHPool) {
NEW
27
        rsETHPool = _rsETHPool;
×
28
    }
29

30
    /// @notice Deploys a Hyperdrive instance with the given parameters.
31
    /// @param __name The name of the Hyperdrive pool.
32
    /// @param _config The configuration of the Hyperdrive pool.
33
    /// @param _adminController The admin controller that will specify the
34
    ///        admin parameters for this instance.
35
    /// @param _target0 The target0 address.
36
    /// @param _target1 The target1 address.
37
    /// @param _target2 The target2 address.
38
    /// @param _target3 The target3 address.
39
    /// @param _target4 The target4 address.
40
    /// @param _salt The create2 salt used in the deployment.
41
    /// @return The address of the newly deployed RsETHLineaHyperdrive instance.
42
    function deployHyperdrive(
43
        string memory __name,
44
        IHyperdrive.PoolConfig memory _config,
45
        IHyperdriveAdminController _adminController,
46
        bytes memory, // unused _extraData,
47
        address _target0,
48
        address _target1,
49
        address _target2,
50
        address _target3,
51
        address _target4,
52
        bytes32 _salt
53
    ) external returns (address) {
54
        return (
32✔
55
            address(
56
                // NOTE: We hash the sender with the salt to prevent the
57
                // front-running of deployments.
58
                new RsETHLineaHyperdrive{
59
                    salt: keccak256(abi.encode(msg.sender, _salt))
60
                }(
61
                    __name,
62
                    _config,
63
                    _adminController,
64
                    _target0,
65
                    _target1,
66
                    _target2,
67
                    _target3,
68
                    _target4,
69
                    rsETHPool
70
                )
71
            )
72
        );
73
    }
74
}
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