[<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>