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

delvtech / hyperdrive / 10078266229

24 Jul 2024 02:09PM UTC coverage: 91.041% (-0.6%) from 91.602%
10078266229

Pull #1110

github

web-flow
Merge b0abc7ad6 into 2514eecb1
Pull Request #1110: etherfi yield source

49 of 68 new or added lines in 10 files covered. (72.06%)

1 existing line in 1 file now uncovered.

2195 of 2411 relevant lines covered (91.04%)

360130.92 hits per line

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

66.67
/contracts/src/deployers/eeth/EETHHyperdriveCoreDeployer.sol
1
// SPDX-License-Identifier: Apache-2.0
2
pragma solidity 0.8.20;
3

4
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
5
import { IHyperdriveCoreDeployer } from "../../interfaces/IHyperdriveCoreDeployer.sol";
6
import { EETHHyperdrive } from "../../instances/eeth/EETHHyperdrive.sol";
7
import { ILiquidityPool } from "etherfi/src/interfaces/ILiquidityPool.sol";
8

9
/// @author DELV
10
/// @title EETHHyperdriveCoreDeployer
11
/// @notice The core deployer for the EETHHyperdrive implementation.
12
/// @custom:disclaimer The language used in this code is for coding convenience
13
///                    only, and is not intended to, and does not, have any
14
///                    particular legal or regulatory significance.
15
contract EETHHyperdriveCoreDeployer is IHyperdriveCoreDeployer {
16
    /// @notice The Etherfi contract.
17
    ILiquidityPool public immutable liquidityPool;
18

19
    /// @notice Instantiates the core deployer.
20
    /// @param _liquidityPool The Etherfi contract.
21
    constructor(ILiquidityPool _liquidityPool) {
NEW
22
        liquidityPool = _liquidityPool;
×
23
    }
24

25
    /// @notice Deploys a Hyperdrive instance with the given parameters.
26
    /// @param __name The name of the Hyperdrive pool.
27
    /// @param _config The configuration of the Hyperdrive pool.
28
    /// @param _target0 The target0 address.
29
    /// @param _target1 The target1 address.
30
    /// @param _target2 The target2 address.
31
    /// @param _target3 The target3 address.
32
    /// @param _target4 The target4 address.
33
    /// @param _salt The create2 salt used in the deployment.
34
    /// @return The address of the newly deployed EETHHyperdrive instance.
35
    function deployHyperdrive(
36
        string memory __name,
37
        IHyperdrive.PoolConfig memory _config,
38
        bytes memory, // unused _extraData,
39
        address _target0,
40
        address _target1,
41
        address _target2,
42
        address _target3,
43
        address _target4,
44
        bytes32 _salt
45
    ) external returns (address) {
46
        address hyperdrive = address(
24✔
47
            // NOTE: We hash the sender with the salt to prevent the
48
            // front-running of deployments.
49
            new EETHHyperdrive{
50
                salt: keccak256(abi.encode(msg.sender, _salt))
51
            }(
52
                __name,
53
                _config,
54
                _target0,
55
                _target1,
56
                _target2,
57
                _target3,
58
                _target4,
59
                liquidityPool
60
            )
61
        );
62
        return hyperdrive;
24✔
63
    }
64
}
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