Skip to content

Commit

Permalink
Improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
rya-sge committed Sep 9, 2024
1 parent 5c5427f commit befff83
Show file tree
Hide file tree
Showing 16 changed files with 643 additions and 523 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Please follow https://changelog.md/ conventions.

## v0.3.0

- Add ERC-2771 support

## v0.2.0

- Add the constant VERSION
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@ function setDocument(address smartContract,bytes32 name_,string memory uri_, byt
| 🛑 | Function can modify state |
| 💵 | Function is payable |



## Gasless support (ERC-2771)

The DocumentEngine supports client-side gasless transactions using the [Gas Station Network](https://docs.opengsn.org/#the-problem) (GSN) pattern, the main open standard for transfering fee payment to another account than that of the transaction issuer. The contract uses the OpenZeppelin contract `ERC2771ContextUpgradeable`, which allows a contract to get the original client with `_msgSender()` instead of the fee payer given by `msg.sender` while allowing upgrades on the main contract (see *Deployment via a proxy* above).

At deployment, the parameter `forwarder` inside the constructor has to be set with the defined address of the forwarder. Please note that the forwarder can not be changed after deployment.

Please see the OpenGSN [documentation](https://docs.opengsn.org/contracts/#receiving-a-relayed-call) for more details on what is done to support GSN in the contract.



## Dependencies

The toolchain includes the following components, where the versions are the latest ones that we tested:
Expand Down
24 changes: 12 additions & 12 deletions doc/coverage/coverage/index-sort-b.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntryHi">100.0 %</td>
<td class="headerCovTableEntry">51</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntryHi">98.1 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-09-03 09:18:28</td>
<td class="headerValue">2024-09-09 15:02:57</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntry">11</td>
<td class="headerCovTableEntryHi">90.9 %</td>
<td class="headerCovTableEntry">12</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntryMed">85.7 %</td>
</tr>
<tr>
<td></td>
Expand Down Expand Up @@ -84,12 +84,12 @@
<tr>
<td class="coverFile"><a href="src/index.html">src</a></td>
<td class="coverBar" align="center">
<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>
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="emerald.png" width=98 height=10 alt="98.1%"><img src="snow.png" width=2 height=10 alt="98.1%"></td></tr></table>
</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">48 / 48</td>
<td class="coverPerHi">90.9&nbsp;%</td>
<td class="coverNumHi">10 / 11</td>
<td class="coverPerHi">98.1&nbsp;%</td>
<td class="coverNumHi">51 / 52</td>
<td class="coverPerMed">85.7&nbsp;%</td>
<td class="coverNumMed">12 / 14</td>
<td class="coverPerHi">92.9&nbsp;%</td>
<td class="coverNumHi">13 / 14</td>
</tr>
Expand Down
24 changes: 12 additions & 12 deletions doc/coverage/coverage/index-sort-f.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntryHi">100.0 %</td>
<td class="headerCovTableEntry">51</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntryHi">98.1 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-09-03 09:18:28</td>
<td class="headerValue">2024-09-09 15:02:57</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntry">11</td>
<td class="headerCovTableEntryHi">90.9 %</td>
<td class="headerCovTableEntry">12</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntryMed">85.7 %</td>
</tr>
<tr>
<td></td>
Expand Down Expand Up @@ -84,12 +84,12 @@
<tr>
<td class="coverFile"><a href="src/index.html">src</a></td>
<td class="coverBar" align="center">
<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>
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="emerald.png" width=98 height=10 alt="98.1%"><img src="snow.png" width=2 height=10 alt="98.1%"></td></tr></table>
</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">48 / 48</td>
<td class="coverPerHi">90.9&nbsp;%</td>
<td class="coverNumHi">10 / 11</td>
<td class="coverPerHi">98.1&nbsp;%</td>
<td class="coverNumHi">51 / 52</td>
<td class="coverPerMed">85.7&nbsp;%</td>
<td class="coverNumMed">12 / 14</td>
<td class="coverPerHi">92.9&nbsp;%</td>
<td class="coverNumHi">13 / 14</td>
</tr>
Expand Down
24 changes: 12 additions & 12 deletions doc/coverage/coverage/index-sort-l.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntryHi">100.0 %</td>
<td class="headerCovTableEntry">51</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntryHi">98.1 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-09-03 09:18:28</td>
<td class="headerValue">2024-09-09 15:02:57</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntry">11</td>
<td class="headerCovTableEntryHi">90.9 %</td>
<td class="headerCovTableEntry">12</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntryMed">85.7 %</td>
</tr>
<tr>
<td></td>
Expand Down Expand Up @@ -84,12 +84,12 @@
<tr>
<td class="coverFile"><a href="src/index.html">src</a></td>
<td class="coverBar" align="center">
<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>
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="emerald.png" width=98 height=10 alt="98.1%"><img src="snow.png" width=2 height=10 alt="98.1%"></td></tr></table>
</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">48 / 48</td>
<td class="coverPerHi">90.9&nbsp;%</td>
<td class="coverNumHi">10 / 11</td>
<td class="coverPerHi">98.1&nbsp;%</td>
<td class="coverNumHi">51 / 52</td>
<td class="coverPerMed">85.7&nbsp;%</td>
<td class="coverNumMed">12 / 14</td>
<td class="coverPerHi">92.9&nbsp;%</td>
<td class="coverNumHi">13 / 14</td>
</tr>
Expand Down
24 changes: 12 additions & 12 deletions doc/coverage/coverage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntryHi">100.0 %</td>
<td class="headerCovTableEntry">51</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntryHi">98.1 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-09-03 09:18:28</td>
<td class="headerValue">2024-09-09 15:02:57</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntry">11</td>
<td class="headerCovTableEntryHi">90.9 %</td>
<td class="headerCovTableEntry">12</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntryMed">85.7 %</td>
</tr>
<tr>
<td></td>
Expand Down Expand Up @@ -84,12 +84,12 @@
<tr>
<td class="coverFile"><a href="src/index.html">src</a></td>
<td class="coverBar" align="center">
<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>
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="emerald.png" width=98 height=10 alt="98.1%"><img src="snow.png" width=2 height=10 alt="98.1%"></td></tr></table>
</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">48 / 48</td>
<td class="coverPerHi">90.9&nbsp;%</td>
<td class="coverNumHi">10 / 11</td>
<td class="coverPerHi">98.1&nbsp;%</td>
<td class="coverNumHi">51 / 52</td>
<td class="coverPerMed">85.7&nbsp;%</td>
<td class="coverNumMed">12 / 14</td>
<td class="coverPerHi">92.9&nbsp;%</td>
<td class="coverNumHi">13 / 14</td>
</tr>
Expand Down
52 changes: 32 additions & 20 deletions doc/coverage/coverage/src/DocumentEngine.sol.func-sort-c.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
<td class="headerValue">lcov.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntry">48</td>
<td class="headerCovTableEntryHi">100.0 %</td>
<td class="headerCovTableEntry">51</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntryHi">98.1 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2024-09-03 09:18:28</td>
<td class="headerValue">2024-09-09 15:02:57</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntry">11</td>
<td class="headerCovTableEntryHi">90.9 %</td>
<td class="headerCovTableEntry">12</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntryMed">85.7 %</td>
</tr>
<tr>
<td></td>
Expand All @@ -69,48 +69,60 @@
<td width="20%" class="tableHead">Hit count <span class="tableHeadSort"><img src="../glass.png" width=10 height=14 alt="Sort by hit count" title="Sort by hit count" border=0></span></td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#167">DocumentEngine.hasRole</a></td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#274">DocumentEngine._msgData</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#185">DocumentEngine.hasRole</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#35">DocumentEngine.removeDocument</a></td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#56">DocumentEngine.removeDocument</a></td>
<td class="coverFnHi">2</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#212">DocumentEngine._removeDocument</a></td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#230">DocumentEngine._removeDocument</a></td>
<td class="coverFnHi">5</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#196">DocumentEngine._removeDocumentName</a></td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#214">DocumentEngine._removeDocumentName</a></td>
<td class="coverFnHi">5</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#106">DocumentEngine.batchRemoveDocuments</a></td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#128">DocumentEngine.batchRemoveDocuments</a></td>
<td class="coverFnHi">7</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#156">DocumentEngine.getAllDocuments</a></td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#175">DocumentEngine.getAllDocuments</a></td>
<td class="coverFnHi">8</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#67">DocumentEngine.batchSetDocuments</a></td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#88">DocumentEngine.batchSetDocuments</a></td>
<td class="coverFnHi">13</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#185">DocumentEngine._getDocument</a></td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#203">DocumentEngine._getDocument</a></td>
<td class="coverFnHi">20</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#134">DocumentEngine.getDocument</a></td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#153">DocumentEngine.getDocument</a></td>
<td class="coverFnHi">20</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#23">DocumentEngine.setDocument</a></td>
<td class="coverFnHi">27</td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#44">DocumentEngine.setDocument</a></td>
<td class="coverFnHi">28</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#238">DocumentEngine._setDocument</a></td>
<td class="coverFnHi">39</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#286">DocumentEngine._contextSuffixLength</a></td>
<td class="coverFnHi">50</td>
</tr>
<tr>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#220">DocumentEngine._setDocument</a></td>
<td class="coverFnHi">38</td>
<td class="coverFn"><a href="DocumentEngine.sol.gcov.html#262">DocumentEngine._msgSender</a></td>
<td class="coverFnHi">50</td>
</tr>
</table>
<br>
Expand Down
Loading

0 comments on commit befff83

Please sign in to comment.