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

delvtech / hyperdrive / 9960075739

16 Jul 2024 03:49PM UTC coverage: 91.882% (+0.5%) from 91.352%
9960075739

Pull #1097

github

mcclurejt
basic testing harness setup
Pull Request #1097: Everlong testing harness

13 of 19 new or added lines in 3 files covered. (68.42%)

2094 of 2279 relevant lines covered (91.88%)

378830.88 hits per line

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

25.0
/contracts/src/everlong/EverlongPositions.sol
1
// SPDX-License-Identifier: Apache-2.0
2
pragma solidity 0.8.20;
3

4
import { IEverlongPositions } from "contracts/src/interfaces/IEverlongPositions.sol";
5
import { DoubleEndedQueue } from "openzeppelin/utils/structs/DoubleEndedQueue.sol";
6

7
contract EverlongPositions is IEverlongPositions {
8
    using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque;
9
    DoubleEndedQueue.Bytes32Deque internal _positions;
10

11
    /// @notice Gets the number of positions managed by the Everlong instance.
12
    /// @return The number of positions.
13
    function getNumberOfPositions() external view returns (uint256) {
14
        return _positions.length();
1✔
15
    }
16

17
    /// @notice Gets the position at an index.
18
    /// @param _index The index of the position.
19
    /// @return The position.
20
    function getPositionAtIndex(
21
        uint256 _index
22
    ) external view returns (Position memory) {
NEW
23
        Position memory position = abi.decode(
×
24
            abi.encodePacked(_positions.at(_index)),
25
            (Position)
26
        );
NEW
27
        return position;
×
28
    }
29

30
    /// @notice Rebalances positions managed by the Everlong instance if needed.
31
    function rebalance() external pure {
NEW
32
        revert("TODO");
×
33
    }
34
}
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