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

NexusMutual / smart-contracts / #261

19 Oct 2023 09:19AM UTC coverage: 0.582% (-81.8%) from 82.368%
#261

Pull #930

MilGard91
wip
Pull Request #930: Feature/tokenomics protocol internal price

1 of 1312 branches covered (0.0%)

Branch coverage included in aggregate %.

39 of 39 new or added lines in 4 files covered. (100.0%)

26 of 3331 relevant lines covered (0.78%)

0.02 hits per line

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

0.0
/contracts/libraries/StakingPoolLibrary.sol
1
// SPDX-License-Identifier: GPL-3.0-only
2

3
pragma solidity ^0.8.18;
4

5
/**
6
 * @dev Simple library to derive the staking pool address from the pool id without external calls
7
 */
8
library StakingPoolLibrary {
9

10
  function getAddress(address factory, uint poolId) internal pure returns (address) {
11

12
    bytes32 hash = keccak256(
×
13
      abi.encodePacked(
14
        hex'ff',
15
        factory,
16
        poolId, // salt
17
        // init code hash of the MinimalBeaconProxy
18
        // updated using patch-staking-pool-library.js script
19
        hex'1eb804b66941a2e8465fa0951be9c8b855b7794ee05b0789ab22a02ee1298ebe' // init code hash
20
      )
21
    );
22

23
    // cast last 20 bytes of hash to address
24
    return address(uint160(uint(hash)));
×
25
  }
26

27
}
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