Skip to content

Latest commit

ย 

History

History
436 lines (346 loc) ยท 18.5 KB

metrics.md

File metadata and controls

436 lines (346 loc) ยท 18.5 KB

get in touch with Consensys Diligence
[ ๐ŸŒ ๐Ÿ“ฉ ๐Ÿ”ฅ ]

Solidity Metrics for 'CLI'

Table of contents

Scope

This section lists files that are in scope for the metrics report.

  • Project: 'CLI'

  • Included Files:

    • ``
  • Excluded Paths:

    • ``
  • File Limit: undefined

    • Exclude File list Limit: undefined
  • Workspace Repository: unknown (undefined@undefined)

Source Units in Scope

Source Units Analyzed: 17
Source Units in Scope: 17 (100%)

Type File Logic Contracts Interfaces Lines nLines nSLOC Comment Lines Complex. Score Capabilities
๐Ÿ“ contracts/LRTConfig.sol 1 **** 180 157 98 36 78 ****
๐Ÿ“ contracts/LRTDepositPool.sol 1 **** 233 201 109 60 112 ๐Ÿ“คฮฃ
๐Ÿ“ contracts/LRTOracle.sol 1 **** 100 93 53 21 43 ฮฃ
๐Ÿ“ contracts/NodeDelegator.sol 1 **** 135 109 65 24 105 ๐Ÿ“คฮฃ
๐Ÿ“ contracts/NovETH.sol 1 **** 66 66 35 21 43 ****
๐Ÿ” contracts/interfaces/IEigenStrategyManager.sol **** 1 29 22 4 20 5 ****
๐Ÿ” contracts/interfaces/ILRTConfig.sol **** 1 35 22 14 4 15 ****
๐Ÿ” contracts/interfaces/ILRTDepositPool.sol **** 1 39 19 13 3 19 ****
๐Ÿ” contracts/interfaces/ILRTOracle.sol **** 1 12 9 4 3 7 ****
๐Ÿ” contracts/interfaces/INodeDelegator.sol **** 1 21 14 6 4 9 ****
๐Ÿ” contracts/interfaces/IPriceFetcher.sol **** 1 10 8 4 2 5 ****
๐Ÿ” contracts/interfaces/INovETH.sol **** 1 10 7 4 1 7 ****
๐Ÿ” contracts/interfaces/IStrategy.sol **** 1 92 22 4 65 23 ****
๐Ÿ“๐Ÿ” contracts/oracles/ChainlinkPriceOracle.sol 1 1 65 55 31 14 35 ****
๐ŸŽจ contracts/utils/LRTConfigRoleChecker.sol 1 **** 59 59 39 9 28 ****
๐Ÿ“š contracts/utils/LRTConstants.sol 1 **** 23 23 13 7 29 ๐Ÿงฎ
๐Ÿ“š contracts/utils/UtilLib.sol 1 **** 14 14 7 5 4 ****
๐Ÿ“๐Ÿ“š๐Ÿ”๐ŸŽจ Totals 9 9 1123 900 503 299 567 ๐Ÿ“ค๐Ÿงฎฮฃ
Legend: [โž•]
  • Lines: total lines of the source unit
  • nLines: normalized lines of the source unit (e.g. normalizes functions spanning multiple lines)
  • nSLOC: normalized source lines of code (only source-code lines; no comments, no blank lines)
  • Comment Lines: lines containing single or block comments
  • Complexity Score: a custom complexity score derived from code statements that are known to introduce code complexity (branches, loops, calls, external interfaces, ...)

Out of Scope

Excluded Source Units

Source Units Excluded: 0

[โž•]

| File | | ------ | | None |
Duplicate Source Units

Duplicate Source Units Excluded: 0

[โž•]

| File | | ------ | | None |
Doppelganger Contracts

Doppelganger Contracts: 0

[โž•]

| File | Contract | Doppelganger | | ------ | -------- | ------------ |

Report

Overview

The analysis finished with 0 errors and 0 duplicate files.

Risk

Source Lines (sloc vs. nsloc)

Inline Documentation

  • Comment-to-Source Ratio: On average there are2.14 code lines per comment (lower=better).
  • ToDo's: 0

Components

๐Ÿ“Contracts ๐Ÿ“šLibraries ๐Ÿ”Interfaces ๐ŸŽจAbstract
6 2 9 1

Exposed Functions

This section lists functions that are explicitly declared public or payable. Please note that getter methods for public stateVars are not included.

๐ŸŒPublic ๐Ÿ’ฐPayable
87 0
External Internal Private Pure View
82 58 4 1 40

StateVariables

Total ๐ŸŒPublic
24 24

Capabilities

Solidity Versions observed ๐Ÿงช Experimental Features ๐Ÿ’ฐ Can Receive Funds ๐Ÿ–ฅ Uses Assembly ๐Ÿ’ฃ Has Destroyable Contracts
0.8.21
>=0.5.0
**** **** ****
๐Ÿ“ค Transfers ETH โšก Low-Level Calls ๐Ÿ‘ฅ DelegateCall ๐Ÿงฎ Uses Hash Functions ๐Ÿ”– ECRecover ๐ŸŒ€ New/Create/Create2
yes **** **** yes **** ****
โ™ป๏ธ TryCatch ฮฃ Unchecked
**** yes

Dependencies / External Imports

Dependency / Import Path Count
@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol 1
@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol 2
@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol 3
@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol 2
@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol 1
@openzeppelin/contracts/access/IAccessControl.sol 1
@openzeppelin/contracts/interfaces/IERC20.sol 3
@openzeppelin/contracts/token/ERC20/IERC20.sol 2

Totals

Summary
AST Node Statistics
Function Calls
Assembly Calls
AST Total
Inheritance Graph

[โž•]

CallGraph

[โž•]

Contract Summary

[โž•]

Sลซrya's Description Report

Files Description Table

File Name SHA-1 Hash
contracts/LRTConfig.sol [object Promise]
contracts/LRTDepositPool.sol [object Promise]
contracts/LRTOracle.sol [object Promise]
contracts/NodeDelegator.sol [object Promise]
contracts/NovETH.sol [object Promise]
contracts/interfaces/IEigenStrategyManager.sol [object Promise]
contracts/interfaces/ILRTConfig.sol [object Promise]
contracts/interfaces/ILRTDepositPool.sol [object Promise]
contracts/interfaces/ILRTOracle.sol [object Promise]
contracts/interfaces/INodeDelegator.sol [object Promise]
contracts/interfaces/IPriceFetcher.sol [object Promise]
contracts/interfaces/INovETH.sol [object Promise]
contracts/interfaces/IStrategy.sol [object Promise]
contracts/oracles/ChainlinkPriceOracle.sol [object Promise]
contracts/utils/LRTConfigRoleChecker.sol [object Promise]
contracts/utils/LRTConstants.sol [object Promise]
contracts/utils/UtilLib.sol [object Promise]

Contracts Description Table

Contract Type Bases
โ”” Function Name Visibility Mutability Modifiers
LRTConfig Implementation ILRTConfig, AccessControlUpgradeable
โ”” Public โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” initialize External โ—๏ธ ๐Ÿ›‘ initializer
โ”” addNewSupportedAsset External โ—๏ธ ๐Ÿ›‘ onlyRole
โ”” _addNewSupportedAsset Private ๐Ÿ” ๐Ÿ›‘
โ”” updateAssetDepositLimit External โ—๏ธ ๐Ÿ›‘ onlyRole onlySupportedAsset
โ”” updateAssetStrategy External โ—๏ธ ๐Ÿ›‘ onlyRole onlySupportedAsset
โ”” getLSTToken External โ—๏ธ NOโ—๏ธ
โ”” getContract External โ—๏ธ NOโ—๏ธ
โ”” getSupportedAssetList External โ—๏ธ NOโ—๏ธ
โ”” setNovETH External โ—๏ธ ๐Ÿ›‘ onlyRole
โ”” setToken External โ—๏ธ ๐Ÿ›‘ onlyRole
โ”” _setToken Private ๐Ÿ” ๐Ÿ›‘
โ”” setContract External โ—๏ธ ๐Ÿ›‘ onlyRole
โ”” _setContract Private ๐Ÿ” ๐Ÿ›‘
LRTDepositPool Implementation ILRTDepositPool, LRTConfigRoleChecker, PausableUpgradeable, ReentrancyGuardUpgradeable
โ”” Public โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” initialize External โ—๏ธ ๐Ÿ›‘ initializer
โ”” getTotalAssetDeposits Public โ—๏ธ NOโ—๏ธ
โ”” getAssetCurrentLimit Public โ—๏ธ NOโ—๏ธ
โ”” getNodeDelegatorQueue External โ—๏ธ NOโ—๏ธ
โ”” getAssetDistributionData Public โ—๏ธ onlySupportedAsset
โ”” getNovETHAmountToMint Public โ—๏ธ NOโ—๏ธ
โ”” depositAsset External โ—๏ธ ๐Ÿ›‘ whenNotPaused nonReentrant onlySupportedAsset
โ”” _mintNovETH Private ๐Ÿ” ๐Ÿ›‘
โ”” addNodeDelegatorContractToQueue External โ—๏ธ ๐Ÿ›‘ onlyLRTAdmin
โ”” transferAssetToNodeDelegator External โ—๏ธ ๐Ÿ›‘ nonReentrant onlyLRTManager onlySupportedAsset
โ”” updateMaxNodeDelegatorCount External โ—๏ธ ๐Ÿ›‘ onlyLRTAdmin
โ”” setMinAmountToDeposit External โ—๏ธ ๐Ÿ›‘ onlyLRTAdmin
โ”” pause External โ—๏ธ ๐Ÿ›‘ onlyLRTManager
โ”” unpause External โ—๏ธ ๐Ÿ›‘ onlyLRTAdmin
LRTOracle Implementation ILRTOracle, LRTConfigRoleChecker, Initializable
โ”” Public โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” initialize External โ—๏ธ ๐Ÿ›‘ initializer
โ”” getAssetPrice Public โ—๏ธ onlySupportedAsset
โ”” updateNovETHPrice External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” updatePriceOracleFor External โ—๏ธ ๐Ÿ›‘ onlyLRTManager onlySupportedAsset
NodeDelegator Implementation INodeDelegator, LRTConfigRoleChecker, PausableUpgradeable, ReentrancyGuardUpgradeable
โ”” Public โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” initialize External โ—๏ธ ๐Ÿ›‘ initializer
โ”” maxApproveToEigenStrategyManager External โ—๏ธ ๐Ÿ›‘ onlySupportedAsset onlyLRTManager
โ”” depositAssetIntoStrategy External โ—๏ธ ๐Ÿ›‘ whenNotPaused nonReentrant onlySupportedAsset onlyLRTManager
โ”” transferBackToLRTDepositPool External โ—๏ธ ๐Ÿ›‘ whenNotPaused nonReentrant onlySupportedAsset onlyLRTManager
โ”” getAssetBalances External โ—๏ธ NOโ—๏ธ
โ”” getAssetBalance External โ—๏ธ NOโ—๏ธ
โ”” pause External โ—๏ธ ๐Ÿ›‘ onlyLRTManager
โ”” unpause External โ—๏ธ ๐Ÿ›‘ onlyLRTAdmin
NovETH Implementation Initializable, LRTConfigRoleChecker, ERC20Upgradeable, PausableUpgradeable
โ”” Public โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” initialize External โ—๏ธ ๐Ÿ›‘ initializer
โ”” mint External โ—๏ธ ๐Ÿ›‘ onlyRole whenNotPaused
โ”” burnFrom External โ—๏ธ ๐Ÿ›‘ onlyRole whenNotPaused
โ”” pause External โ—๏ธ ๐Ÿ›‘ onlyLRTManager
โ”” unpause External โ—๏ธ ๐Ÿ›‘ onlyLRTAdmin
โ”” updateLRTConfig External โ—๏ธ ๐Ÿ›‘ onlyLRTAdmin
IEigenStrategyManager Interface
โ”” depositIntoStrategy External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” getDeposits External โ—๏ธ NOโ—๏ธ
ILRTConfig Interface
โ”” novETH External โ—๏ธ NOโ—๏ธ
โ”” assetStrategy External โ—๏ธ NOโ—๏ธ
โ”” isSupportedAsset External โ—๏ธ NOโ—๏ธ
โ”” getLSTToken External โ—๏ธ NOโ—๏ธ
โ”” getContract External โ—๏ธ NOโ—๏ธ
โ”” getSupportedAssetList External โ—๏ธ NOโ—๏ธ
โ”” depositLimitByAsset External โ—๏ธ NOโ—๏ธ
ILRTDepositPool Interface
โ”” depositAsset External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” getTotalAssetDeposits External โ—๏ธ NOโ—๏ธ
โ”” getAssetCurrentLimit External โ—๏ธ NOโ—๏ธ
โ”” getNovETHAmountToMint External โ—๏ธ NOโ—๏ธ
โ”” addNodeDelegatorContractToQueue External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” transferAssetToNodeDelegator External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” updateMaxNodeDelegatorCount External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” getNodeDelegatorQueue External โ—๏ธ NOโ—๏ธ
โ”” getAssetDistributionData External โ—๏ธ NOโ—๏ธ
ILRTOracle Interface
โ”” getAssetPrice External โ—๏ธ NOโ—๏ธ
โ”” assetPriceOracle External โ—๏ธ NOโ—๏ธ
โ”” novETHPrice External โ—๏ธ NOโ—๏ธ
INodeDelegator Interface
โ”” depositAssetIntoStrategy External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” maxApproveToEigenStrategyManager External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” getAssetBalances External โ—๏ธ NOโ—๏ธ
โ”” getAssetBalance External โ—๏ธ NOโ—๏ธ
IPriceFetcher Interface
โ”” getAssetPrice External โ—๏ธ NOโ—๏ธ
โ”” assetPriceFeed External โ—๏ธ NOโ—๏ธ
INovETH Interface IERC20
โ”” mint External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” burn External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
IStrategy Interface
โ”” deposit External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” withdraw External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” sharesToUnderlying External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” underlyingToShares External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” userUnderlying External โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” sharesToUnderlyingView External โ—๏ธ NOโ—๏ธ
โ”” underlyingToSharesView External โ—๏ธ NOโ—๏ธ
โ”” userUnderlyingView External โ—๏ธ NOโ—๏ธ
โ”” underlyingToken External โ—๏ธ NOโ—๏ธ
โ”” totalShares External โ—๏ธ NOโ—๏ธ
โ”” explanation External โ—๏ธ NOโ—๏ธ
AggregatorV3Interface Interface
โ”” decimals External โ—๏ธ NOโ—๏ธ
โ”” latestRoundData External โ—๏ธ NOโ—๏ธ
ChainlinkPriceOracle Implementation IPriceFetcher, LRTConfigRoleChecker, Initializable
โ”” Public โ—๏ธ ๐Ÿ›‘ NOโ—๏ธ
โ”” initialize External โ—๏ธ ๐Ÿ›‘ initializer
โ”” getAssetPrice External โ—๏ธ onlySupportedAsset
โ”” updatePriceFeedFor External โ—๏ธ ๐Ÿ›‘ onlyLRTManager onlySupportedAsset
LRTConfigRoleChecker Implementation
โ”” updateLRTConfig External โ—๏ธ ๐Ÿ›‘ onlyLRTAdmin
LRTConstants Library
UtilLib Library
โ”” checkNonZeroAddress Internal ๐Ÿ”’

Legend

Symbol Meaning
๐Ÿ›‘ Function can modify state
๐Ÿ’ต Function is payable
____ Thinking about smart contract security? We can provide training, ongoing advice, and smart contract auditing. [Contact us](https://diligence.consensys.net/contact/).