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

NexusMutual / smart-contracts / #1591

30 Oct 2025 12:26PM UTC coverage: 57.723% (-29.6%) from 87.366%
#1591

push

shark0der
Merge branch 'audit/governance-and-assessments-august-2025' into release-candidate

906 of 1710 branches covered (52.98%)

Branch coverage included in aggregate %.

793 of 925 new or added lines in 18 files covered. (85.73%)

863 existing lines in 16 files now uncovered.

1751 of 2893 relevant lines covered (60.53%)

14.0 hits per line

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

52.63
/contracts/modules/staking/StakingPoolFactory.sol
1
// SPDX-License-Identifier: AGPL-3.0-only
2

3
pragma solidity ^0.8.18;
4

5
import "../../interfaces/IStakingPoolFactory.sol";
6
import "./MinimalBeaconProxy.sol";
7

8
contract StakingPoolFactory is IStakingPoolFactory {
9

10
  address public operator;
11
  uint96 internal _stakingPoolCount;
12

13
  // temporary beacon address storage to avoid constructor arguments in the proxy
14
  address public beacon;
15

16
  constructor(address _operator) {
17
    operator = _operator;
3✔
18
  }
19

20
  function changeOperator(address newOperator) public {
UNCOV
21
    require(msg.sender == operator, "StakingPoolFactory: Not operator");
×
UNCOV
22
    require(newOperator != address(0), "StakingPoolFactory: Invalid operator");
×
UNCOV
23
    operator = newOperator;
×
24
  }
25

26
  function stakingPoolCount() external view returns (uint) {
27
    return _stakingPoolCount;
3✔
28
  }
29

30
  function create(address _beacon) external returns (uint poolId, address stakingPoolAddress) {
31

32
    require(msg.sender == operator, "StakingPoolFactory: Not operator");
16!
33

34
    beacon = _beacon;
16✔
35
    poolId = ++_stakingPoolCount;
16✔
36

37
    stakingPoolAddress = address(
16✔
38
      new MinimalBeaconProxy{salt : bytes32(poolId)}()
39
    );
40

41
    require(
16!
42
      stakingPoolAddress != address(0),
43
      "StakingPoolFactory: Failed to create staking pool"
44
    );
45

46
    emit StakingPoolCreated(poolId, stakingPoolAddress);
16✔
47
  }
48
}
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

© 2026 Coveralls, Inc