[<img width="200" alt="get in touch with Consensys Diligence" src="https://user-images.githubusercontent.com/2865694/56826101-91dcf380-685b-11e9-937c-af49c2510aa0.png">](https://diligence.consensys.net)<br/> <sup> [[ ๐ŸŒ ](https://diligence.consensys.net) [ ๐Ÿ“ฉ ](mailto:diligence@consensys.net) [ ๐Ÿ”ฅ ](https://consensys.github.io/diligence/)] </sup><br/><br/> # Solidity Metrics for 'CLI' ## Table of contents - [Scope](#t-scope) - [Source Units in Scope](#t-source-Units-in-Scope) - [Out of Scope](#t-out-of-scope) - [Excluded Source Units](#t-out-of-scope-excluded-source-units) - [Duplicate Source Units](#t-out-of-scope-duplicate-source-units) - [Doppelganger Contracts](#t-out-of-scope-doppelganger-contracts) - [Report Overview](#t-report) - [Risk Summary](#t-risk) - [Source Lines](#t-source-lines) - [Inline Documentation](#t-inline-documentation) - [Components](#t-components) - [Exposed Functions](#t-exposed-functions) - [StateVariables](#t-statevariables) - [Capabilities](#t-capabilities) - [Dependencies](#t-package-imports) - [Totals](#t-totals) ## <span id=t-scope>Scope</span> 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`) ### <span id=t-source-Units-in-Scope>Source Units in Scope</span> Source Units Analyzed: **`2`**<br> Source Units in Scope: **`2`** (**100%**) | Type | File | Logic Contracts | Interfaces | Lines | nLines | nSLOC | Comment Lines | Complex. Score | Capabilities | | ---- | ------ | --------------- | ---------- | ----- | ------ | ----- | ------------- | -------------- | ------------ | | ๐Ÿ“๐Ÿ” | contracts/chatsEscrow.sol | 1 | 3 | 251 | 229 | 189 | 4 | 142 | **<abbr title='Experimental Features'>๐Ÿงช</abbr><abbr title='Payable Functions'>๐Ÿ’ฐ</abbr><abbr title='Initiates ETH Value Transfer'>๐Ÿ“ค</abbr>** | | ๐Ÿ“ | contracts/chatsEscrowFactory.sol | 1 | **** | 46 | 40 | 30 | 6 | 27 | **<abbr title='Experimental Features'>๐Ÿงช</abbr><abbr title='create/create2'>๐ŸŒ€</abbr>** | | ๐Ÿ“๐Ÿ” | **Totals** | **2** | **3** | **297** | **269** | **219** | **10** | **169** | **<abbr title='Experimental Features'>๐Ÿงช</abbr><abbr title='Payable Functions'>๐Ÿ’ฐ</abbr><abbr title='Initiates ETH Value Transfer'>๐Ÿ“ค</abbr><abbr title='create/create2'>๐ŸŒ€</abbr>** | <sub> Legend: <a onclick="toggleVisibility('table-legend', this)">[โž•]</a> <div id="table-legend" style="display:none"> <ul> <li> <b>Lines</b>: total lines of the source unit </li> <li> <b>nLines</b>: normalized lines of the source unit (e.g. normalizes functions spanning multiple lines) </li> <li> <b>nSLOC</b>: normalized source lines of code (only source-code lines; no comments, no blank lines) </li> <li> <b>Comment Lines</b>: lines containing single or block comments </li> <li> <b>Complexity Score</b>: a custom complexity score derived from code statements that are known to introduce code complexity (branches, loops, calls, external interfaces, ...) </li> </ul> </div> </sub> #### <span id=t-out-of-scope>Out of Scope</span> ##### <span id=t-out-of-scope-excluded-source-units>Excluded Source Units</span> Source Units Excluded: **`0`** <a onclick="toggleVisibility('excluded-files', this)">[โž•]</a> <div id="excluded-files" style="display:none"> | File | | ------ | | None | </div> ##### <span id=t-out-of-scope-duplicate-source-units>Duplicate Source Units</span> Duplicate Source Units Excluded: **`0`** <a onclick="toggleVisibility('duplicate-files', this)">[โž•]</a> <div id="duplicate-files" style="display:none"> | File | | ------ | | None | </div> ##### <span id=t-out-of-scope-doppelganger-contracts>Doppelganger Contracts</span> Doppelganger Contracts: **`0`** <a onclick="toggleVisibility('doppelganger-contracts', this)">[โž•]</a> <div id="doppelganger-contracts" style="display:none"> | File | Contract | Doppelganger | | ------ | -------- | ------------ | </div> ## <span id=t-report>Report</span> ### Overview The analysis finished with **`0`** errors and **`0`** duplicate files. #### <span id=t-risk>Risk</span> <div class="wrapper" style="max-width: 512px; margin: auto"> <canvas id="chart-risk-summary"></canvas> </div> #### <span id=t-source-lines>Source Lines (sloc vs. nsloc)</span> <div class="wrapper" style="max-width: 512px; margin: auto"> <canvas id="chart-nsloc-total"></canvas> </div> #### <span id=t-inline-documentation>Inline Documentation</span> - **Comment-to-Source Ratio:** On average there are`24.4` code lines per comment (lower=better). - **ToDo's:** `0` #### <span id=t-components>Components</span> | ๐Ÿ“Contracts | ๐Ÿ“šLibraries | ๐Ÿ”Interfaces | ๐ŸŽจAbstract | | ------------- | ----------- | ------------ | ---------- | | 2 | 0 | 3 | 0 | #### <span id=t-exposed-functions>Exposed Functions</span> This section lists functions that are explicitly declared public or payable. Please note that getter methods for public stateVars are not included. | ๐ŸŒPublic | ๐Ÿ’ฐPayable | | ---------- | --------- | | 26 | 3 | | External | Internal | Private | Pure | View | | ---------- | -------- | ------- | ---- | ---- | | 8 | 17 | 0 | 0 | 7 | #### <span id=t-statevariables>StateVariables</span> | Total | ๐ŸŒPublic | | ---------- | --------- | | 24 | 12 | #### <span id=t-capabilities>Capabilities</span> | Solidity Versions observed | ๐Ÿงช Experimental Features | ๐Ÿ’ฐ Can Receive Funds | ๐Ÿ–ฅ Uses Assembly | ๐Ÿ’ฃ Has Destroyable Contracts | | -------------------------- | ------------------------ | -------------------- | ---------------- | ---------------------------- | | `0.8.4` | `ABIEncoderV2` | `yes` | **** | **** | | ๐Ÿ“ค Transfers ETH | โšก Low-Level Calls | ๐Ÿ‘ฅ DelegateCall | ๐Ÿงฎ Uses Hash Functions | ๐Ÿ”– ECRecover | ๐ŸŒ€ New/Create/Create2 | | ---------------- | ----------------- | --------------- | ---------------------- | ------------ | --------------------- | | `yes` | **** | **** | **** | **** | `yes`<br>โ†’ `NewContract:chatsEscrow` | | โ™ป๏ธ TryCatch | ฮฃ Unchecked | | ---------- | ----------- | | **** | **** | #### <span id=t-package-imports>Dependencies / External Imports</span> | Dependency / Import Path | Count | | ------------------------ | ------ | | @openzeppelin/contracts/access/Ownable.sol | 1 | | @openzeppelin/contracts/token/ERC20/IERC20.sol | 1 | | @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol | 1 | #### <span id=t-totals>Totals</span> ##### Summary <div class="wrapper" style="max-width: 90%; margin: auto"> <canvas id="chart-num-bar"></canvas> </div> ##### AST Node Statistics ###### Function Calls <div class="wrapper" style="max-width: 90%; margin: auto"> <canvas id="chart-num-bar-ast-funccalls"></canvas> </div> ###### Assembly Calls <div class="wrapper" style="max-width: 90%; margin: auto"> <canvas id="chart-num-bar-ast-asmcalls"></canvas> </div> ###### AST Total <div class="wrapper" style="max-width: 90%; margin: auto"> <canvas id="chart-num-bar-ast"></canvas> </div> ##### Inheritance Graph <a onclick="toggleVisibility('surya-inherit', this)">[โž•]</a> <div id="surya-inherit" style="display:none"> <div class="wrapper" style="max-width: 512px; margin: auto"> <div id="surya-inheritance" style="text-align: center;"></div> </div> </div> ##### CallGraph <a onclick="toggleVisibility('surya-call', this)">[โž•]</a> <div id="surya-call" style="display:none"> <div class="wrapper" style="max-width: 512px; margin: auto"> <div id="surya-callgraph" style="text-align: center;"></div> </div> </div> ###### Contract Summary <a onclick="toggleVisibility('surya-mdreport', this)">[โž•]</a> <div id="surya-mdreport" style="display:none"> Sลซrya's Description Report Files Description Table | File Name | SHA-1 Hash | |-------------|--------------| | contracts/chatsEscrow.sol | f421e94a693e427f723ffd028fe2b9e36cd2889f | | contracts/chatsEscrowFactory.sol | 8db84db52b4927bd0566992fecd141c98d84eb1b | Contracts Description Table | Contract | Type | Bases | | | |:----------:|:-------------------:|:----------------:|:----------------:|:---------------:| | โ”” | **Function Name** | **Visibility** | **Mutability** | **Modifiers** | |||||| | **IuniswapRouter** | Interface | ||| | โ”” | exactInputSingle | External โ—๏ธ | ๐Ÿ’ต |NOโ—๏ธ | |||||| | **IquickswapRouter** | Interface | ||| | โ”” | swapExactTokensForTokens | External โ—๏ธ | ๐Ÿ›‘ |NOโ—๏ธ | |||||| | **IWMATIC** | Interface | ||| | โ”” | deposit | External โ—๏ธ | ๐Ÿ’ต |NOโ—๏ธ | | โ”” | transfer | External โ—๏ธ | ๐Ÿ›‘ |NOโ—๏ธ | | โ”” | withdraw | External โ—๏ธ | ๐Ÿ›‘ |NOโ—๏ธ | | โ”” | balanceOf | External โ—๏ธ | ๐Ÿ›‘ |NOโ—๏ธ | | โ”” | approve | External โ—๏ธ | ๐Ÿ›‘ |NOโ—๏ธ | |||||| | **chatsEscrow** | Implementation | Ownable ||| | โ”” | <Constructor> | Public โ—๏ธ | ๐Ÿ›‘ |NOโ—๏ธ | | โ”” | adminSignatory | Public โ—๏ธ | ๐Ÿ›‘ | onlyOwner | | โ”” | endCampaign | Public โ—๏ธ | ๐Ÿ›‘ | onlyOwner | | โ”” | resumeCampaign | Public โ—๏ธ | ๐Ÿ›‘ | onlyOwner | | โ”” | updateStableCoin | Public โ—๏ธ | ๐Ÿ›‘ | onlyOwner | | โ”” | updateErc20Token | Public โ—๏ธ | ๐Ÿ›‘ | onlyOwner | | โ”” | fundCampaignStableCoin | Public โ—๏ธ | ๐Ÿ›‘ | activeCampaign | | โ”” | fundCampaignMatic | Public โ—๏ธ | ๐Ÿ’ต | activeCampaign | | โ”” | fundCampaignErc20Token | Public โ—๏ธ | ๐Ÿ›‘ | activeCampaign | | โ”” | adminWithdrawFunds | Public โ—๏ธ | ๐Ÿ›‘ | onlyOwner | | โ”” | withdrawFunds | Public โ—๏ธ | ๐Ÿ›‘ |NOโ—๏ธ | | โ”” | getFundAmount | Public โ—๏ธ | |NOโ—๏ธ | | โ”” | getFundAvailability | Public โ—๏ธ | |NOโ—๏ธ | | โ”” | funderAvailable | Public โ—๏ธ | |NOโ—๏ธ | | โ”” | WithdrawalApprovalStatus | Public โ—๏ธ | |NOโ—๏ธ | | โ”” | getAdminSignature | Public โ—๏ธ | |NOโ—๏ธ | | โ”” | getCampaignStatus | Public โ—๏ธ | |NOโ—๏ธ | | โ”” | getTokenBalance | Public โ—๏ธ | |NOโ—๏ธ | |||||| | **chatsEscrowFactory** | Implementation | ||| | โ”” | <Constructor> | Public โ—๏ธ | ๐Ÿ›‘ |NOโ—๏ธ | | โ”” | deployEscrow | External โ—๏ธ | ๐Ÿ›‘ | onlyOwner | Legend | Symbol | Meaning | |:--------:|-----------| | ๐Ÿ›‘ | Function can modify state | | ๐Ÿ’ต | Function is payable | </div> ____ <sub> Thinking about smart contract security? We can provide training, ongoing advice, and smart contract auditing. [Contact us](https://diligence.consensys.net/contact/). </sub>