Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
rya-sge committed Apr 29, 2024
1 parent e0c5c27 commit b6ac90b
Show file tree
Hide file tree
Showing 88 changed files with 809 additions and 797 deletions.
2 changes: 1 addition & 1 deletion doc/TOOLCHAIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ OR
- CCIPSender

```bash
npx surya graph src/CCIPSender.sol | dot -Tpng > surya_graph_CCIPSender.png
npx surya graph src/deployment/CCIPSender.sol | dot -Tpng > surya_graph_CCIPSender.png
```

#### Report
Expand Down
Binary file modified doc/schema/CCIPSenderPayment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified doc/schema/surya/surya_graph/surya_graph_CCIPBaseSender.sol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/schema/surya/surya_graph/surya_graph_CCIPSenderBuild.sol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
||||||
| **AuthorizationModule** | Implementation | AccessControl |||
|| hasRole | Public ❗️ | |NO❗️ |
|| supportsInterface | Public ❗️ | |NO❗️ |


### Legend
Expand Down
30 changes: 0 additions & 30 deletions doc/schema/surya/surya_report/surya_report_CCIPBaseReceiver.sol.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
|| **Function Name** | **Visibility** | **Mutability** | **Modifiers** |
||||||
| **CCIPBaseSender** | Implementation | CCIPAllowlistedChain, CCIPSenderBuild, CCIPRouterManage |||
|| transferTokens | External ❗️ | 🛑 | onlyRole |
|| transferTokensBatch | External ❗️ | 🛑 | onlyRole |
|| buildEndSend | Internal 🔒 | 🛑 | |
|| transferTokens | External ❗️ | 🛑 | onlyRole onlyAllowlistedDestinationChain |
|| transferTokensBatch | External ❗️ | 🛑 | onlyRole onlyAllowlistedDestinationChain |
|| _buildEndSend | Internal 🔒 | 🛑 | |


### Legend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

| File Name | SHA-1 Hash |
|-------------|--------------|
| ./bridge/modules/wrapper/CCIPWithdraw.sol | [object Promise] |
| ./bridge/modules/wrapper/CCIPContractBalance.sol | [object Promise] |


### Contracts Description Table
Expand All @@ -15,10 +15,10 @@
|:----------:|:-------------------:|:----------------:|:----------------:|:---------------:|
|| **Function Name** | **Visibility** | **Mutability** | **Modifiers** |
||||||
| **CCIPWithdraw** | Implementation | AuthorizationModule |||
|| <Receive Ether> | External ❗️ | 💵 |NO❗️ |
|| withdrawToken | Public ❗️ | 🛑 | onlyRole |
|| withdrawNativeToken | Public ❗️ | 🛑 | onlyRole |
| **CCIPContractBalance** | Implementation | AuthorizationModule |||
|| depositNativeTokens | Public ❗️ | 💵 | onlyRole |
|| withdrawTokens | Public ❗️ | 🛑 | onlyRole |
|| withdrawNativeTokens | Public ❗️ | 🛑 | onlyRole |


### Legend
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
|| <Constructor> | Public ❗️ | 🛑 |NO❗️ |
|| getRouter | Public ❗️ | |NO❗️ |
|| getSupportedTokens | External ❗️ | |NO❗️ |
|| getFee | Public ❗️ | |NO❗️ |


### Legend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
|:----------:|:-------------------:|:----------------:|:----------------:|:---------------:|
|| **Function Name** | **Visibility** | **Mutability** | **Modifiers** |
||||||
| **CCIPSender** | Implementation | CCIPBaseSender, CCIPWithdraw, ERC2771Context |||
| **CCIPSender** | Implementation | CCIPBaseSender, CCIPContractBalance, ERC2771Context |||
|| <Constructor> | Public ❗️ | 🛑 | CCIPRouterManage ERC2771Context |
|| _msgSender | Internal 🔒 | | |
|| _msgData | Internal 🔒 | | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
|| **Function Name** | **Visibility** | **Mutability** | **Modifiers** |
||||||
| **CCIPSenderBuild** | Implementation | CCIPSenderPayment |||
|| _buildCCIPMessage | Internal 🔒 | | |
|| _buildCCIPTransferMessage | Internal 🔒 | | |
|| buildCCIPTransferMessage | Public ❗️ | |NO❗️ |
|| buildTokenAmounts | Public ❗️ | |NO❗️ |
|| buildCCIPTransferMessage | Public ❗️ | |NO❗️ |
|| _buildCCIPMessage | Public ❗️ | |NO❗️ |
|| _buildCCIPTransferMessage | Public ❗️ | |NO❗️ |


### Legend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
|| **Function Name** | **Visibility** | **Mutability** | **Modifiers** |
||||||
| **CCIPSenderPayment** | Implementation | AuthorizationModule |||
|| setMessageGasLimit | Public ❗️ | 🛑 | onlyRole |
|| setMessageData | Public ❗️ | 🛑 | onlyRole |
|| setFeePaymentMethod | Public ❗️ | 🛑 | onlyRole |
|| isValidPaymentId | Internal 🔒 | | |
|| changeStatusFeePaymentMethod | Public ❗️ | 🛑 | onlyRole |
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions doc/test/coverage/bridge/CCIPBaseSender.sol.func-sort-c.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">20</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">95.2 %</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-04-17 17:59:19</td>
<td class="headerValue">2024-04-26 14:53:42</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">3</td>
Expand Down
6 changes: 3 additions & 3 deletions doc/test/coverage/bridge/CCIPBaseSender.sol.func.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">20</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">95.2 %</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-04-17 17:59:19</td>
<td class="headerValue">2024-04-26 14:53:42</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">3</td>
Expand Down
26 changes: 14 additions & 12 deletions doc/test/coverage/bridge/CCIPBaseSender.sol.gcov.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">20</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">95.2 %</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-04-17 17:59:19</td>
<td class="headerValue">2024-04-26 14:53:42</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">3</td>
Expand Down Expand Up @@ -194,15 +194,17 @@
<a name="123"><span class="lineNum"> 123 </span> : : // transfer tokens to the contract</a>
<a name="124"><span class="lineNum"> 124 </span> :<span class="lineCov"> 20 : IERC20(tokenAmounts[i].token).safeTransferFrom(_msgSender(), address(this), tokenAmounts[i].amount);</span></a>
<a name="125"><span class="lineNum"> 125 </span> : : // approve the Router to spend tokens on contract's behalf. It will spend the amount of the given token</a>
<a name="126"><span class="lineNum"> 126 </span> :<span class="lineCov"> 18 : bool result = IERC20(tokenAmounts[i].token).approve(address(router), tokenAmounts[i].amount);</span></a>
<a name="127"><span class="lineNum"> 127 </span> [<span class="branchNoExec" title="Branch 0 was not executed"> # </span><span class="branchCov" title="Branch 1 was taken 6 times"> + </span>]:<span class="lineCov"> 12 : if(!result){</span></a>
<a name="128"><span class="lineNum"> 128 </span> :<span class="lineNoCov"> 0 : revert CCIPErrors.CCIP_BaseSender_FailApproval();</span></a>
<a name="129"><span class="lineNum"> 129 </span> : : }</a>
<a name="130"><span class="lineNum"> 130 </span> : : }</a>
<a name="131"><span class="lineNum"> 131 </span> : : // Send CCIP Message</a>
<a name="132"><span class="lineNum"> 132 </span> :<span class="lineCov"> 8 : messageId = router.ccipSend(_destinationChainSelector, message); </span></a>
<a name="133"><span class="lineNum"> 133 </span> : : }</a>
<a name="134"><span class="lineNum"> 134 </span> : : }</a>
<a name="126"><span class="lineNum"> 126 </span> :<span class="lineCov"> 12 : IERC20(tokenAmounts[i].token).safeIncreaseAllowance(address(router), tokenAmounts[i].amount);</span></a>
<a name="127"><span class="lineNum"> 127 </span> : : }</a>
<a name="128"><span class="lineNum"> 128 </span> : : // Send CCIP Message</a>
<a name="129"><span class="lineNum"> 129 </span> [<span class="branchNoExec" title="Branch 0 was not executed"> # </span><span class="branchCov" title="Branch 1 was taken 2 times"> + </span>]:<span class="lineCov"> 8 : if(_paymentMethodId == 0){ // Native token</span></a>
<a name="130"><span class="lineNum"> 130 </span> :<span class="lineCov"> 4 : messageId = router.ccipSend{value: fees}(_destinationChainSelector, message); </span></a>
<a name="131"><span class="lineNum"> 131 </span> : : } else{</a>
<a name="132"><span class="lineNum"> 132 </span> :<span class="lineCov"> 4 : messageId = router.ccipSend(_destinationChainSelector, message); </span></a>
<a name="133"><span class="lineNum"> 133 </span> : : }</a>
<a name="134"><span class="lineNum"> 134 </span> : : </a>
<a name="135"><span class="lineNum"> 135 </span> : : }</a>
<a name="136"><span class="lineNum"> 136 </span> : : }</a>
</pre>
</td>
</tr>
Expand Down
12 changes: 6 additions & 6 deletions doc/test/coverage/bridge/index-sort-b.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">20</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">95.2 %</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-04-17 17:59:19</td>
<td class="headerValue">2024-04-26 14:53:42</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">3</td>
Expand Down Expand Up @@ -84,10 +84,10 @@
<tr>
<td class="coverFile"><a href="CCIPBaseSender.sol.gcov.html">CCIPBaseSender.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../emerald.png" width=95 height=10 alt="95.2%"><img src="../snow.png" width=5 height=10 alt="95.2%"></td></tr></table>
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
</td>
<td class="coverPerHi">95.2&nbsp;%</td>
<td class="coverNumHi">20 / 21</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">21 / 21</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">3 / 3</td>
<td class="coverPerLo">50.0&nbsp;%</td>
Expand Down
12 changes: 6 additions & 6 deletions doc/test/coverage/bridge/index-sort-f.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">20</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">95.2 %</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-04-17 17:59:19</td>
<td class="headerValue">2024-04-26 14:53:42</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">3</td>
Expand Down Expand Up @@ -84,10 +84,10 @@
<tr>
<td class="coverFile"><a href="CCIPBaseSender.sol.gcov.html">CCIPBaseSender.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../emerald.png" width=95 height=10 alt="95.2%"><img src="../snow.png" width=5 height=10 alt="95.2%"></td></tr></table>
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
</td>
<td class="coverPerHi">95.2&nbsp;%</td>
<td class="coverNumHi">20 / 21</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">21 / 21</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">3 / 3</td>
<td class="coverPerLo">50.0&nbsp;%</td>
Expand Down
12 changes: 6 additions & 6 deletions doc/test/coverage/bridge/index-sort-l.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">20</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">95.2 %</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-04-17 17:59:19</td>
<td class="headerValue">2024-04-26 14:53:42</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">3</td>
Expand Down Expand Up @@ -84,10 +84,10 @@
<tr>
<td class="coverFile"><a href="CCIPBaseSender.sol.gcov.html">CCIPBaseSender.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../emerald.png" width=95 height=10 alt="95.2%"><img src="../snow.png" width=5 height=10 alt="95.2%"></td></tr></table>
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
</td>
<td class="coverPerHi">95.2&nbsp;%</td>
<td class="coverNumHi">20 / 21</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">21 / 21</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">3 / 3</td>
<td class="coverPerLo">50.0&nbsp;%</td>
Expand Down
Loading

0 comments on commit b6ac90b

Please sign in to comment.