Skip to content

Commit

Permalink
chore: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
iavl committed May 30, 2024
1 parent 1b3f1d5 commit 4e10b06
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 6 deletions.
34 changes: 32 additions & 2 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ <h3 id="help"><a class="header" href="#help">Help</a></h3>
<li><a href="src/interfaces/IPowerToken.sol/interface.IPowerToken.html">IPowerToken</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="ipowertoken"><a class="header" href="#ipowertoken">IPowerToken</a></h1>
<p><a href="https://github.com/RSSNext/follow-contracts/blob/0f065ffc1f37b853fe8b78644f52eefdd5a905bc/src/interfaces/IPowerToken.sol">Git Source</a></p>
<p><a href="https://github.com/RSSNext/follow-contracts/blob/6488639abe4f4b0408162d28b63ea7bd80396362/src/interfaces/IPowerToken.sol">Git Source</a></p>
<h2 id="functions"><a class="header" href="#functions">Functions</a></h2>
<h3 id="initialize"><a class="header" href="#initialize">initialize</a></h3>
<p>Initializes the contract. Setup token name and symbol.
Expand Down Expand Up @@ -269,7 +269,7 @@ <h3 id="balanceofpoins"><a class="header" href="#balanceofpoins">balanceOfPoins<
<pre><code class="language-solidity">function balanceOfPoins(address owner) external view returns (uint256);
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="powertoken"><a class="header" href="#powertoken">PowerToken</a></h1>
<p><a href="https://github.com/RSSNext/follow-contracts/blob/0f065ffc1f37b853fe8b78644f52eefdd5a905bc/src/PowerToken.sol">Git Source</a></p>
<p><a href="https://github.com/RSSNext/follow-contracts/blob/6488639abe4f4b0408162d28b63ea7bd80396362/src/PowerToken.sol">Git Source</a></p>
<p><strong>Inherits:</strong>
ERC20Upgradeable, <a href="src/PowerToken.sol//src/interfaces/IPowerToken.sol/interface.IPowerToken.html">IPowerToken</a>, AccessControlEnumerable</p>
<h2 id="state-variables"><a class="header" href="#state-variables">State Variables</a></h2>
Expand All @@ -281,17 +281,47 @@ <h3 id="_pointsbalances"><a class="header" href="#_pointsbalances">_pointsBalanc
</code></pre>
<h2 id="functions-1"><a class="header" href="#functions-1">Functions</a></h2>
<h3 id="initialize-1"><a class="header" href="#initialize-1">initialize</a></h3>
<p>Initializes the contract. Setup token name and symbol.
Also The msg.sender will be the APP_ADMIN_ROLE.</p>
<pre><code class="language-solidity">function initialize(string calldata name_, string calldata symbol_) external override initializer;
</code></pre>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>name_</code></td><td><code>string</code></td><td>The name of the token.</td></tr>
<tr><td><code>symbol_</code></td><td><code>string</code></td><td>The symbol of the token.</td></tr>
</tbody></table>
</div>
<h3 id="mint-1"><a class="header" href="#mint-1">mint</a></h3>
<p>Mints new token points. The caller must have the APP_ADMIN_ROLE.</p>
<pre><code class="language-solidity">function mint(address to) external override onlyRole(APP_ADMIN_ROLE);
</code></pre>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>to</code></td><td><code>address</code></td><td>The account to receive the tokens.</td></tr>
</tbody></table>
</div>
<h3 id="tip-1"><a class="header" href="#tip-1">tip</a></h3>
<p>Tips with tokens. The caller must have the APP_ADMIN_ROLE.</p>
<p><em>The to and feedId are optional, but at least one of them must be provided.</em></p>
<pre><code class="language-solidity">function tip(uint256 amount, address to, bytes32 feedId) external override onlyRole(APP_ADMIN_ROLE);
</code></pre>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>amount</code></td><td><code>uint256</code></td><td>The amount token points to send. It can be empty.</td></tr>
<tr><td><code>to</code></td><td><code>address</code></td><td></td></tr>
<tr><td><code>feedId</code></td><td><code>bytes32</code></td><td>The feed id. It can be empty.</td></tr>
</tbody></table>
</div>
<h3 id="withdraw-1"><a class="header" href="#withdraw-1">withdraw</a></h3>
<p>Withdraws tokens by feedId. The caller must have the APP_ADMIN_ROLE.</p>
<pre><code class="language-solidity">function withdraw(address to, bytes32 feedId) external override onlyRole(APP_ADMIN_ROLE);
</code></pre>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>to</code></td><td><code>address</code></td><td>The address who receives the tokens.</td></tr>
<tr><td><code>feedId</code></td><td><code>bytes32</code></td><td>The amount belongs to the feedId.</td></tr>
</tbody></table>
</div>
<h3 id="balanceofpoins-1"><a class="header" href="#balanceofpoins-1">balanceOfPoins</a></h3>
<pre><code class="language-solidity">function balanceOfPoins(address owner) external view override returns (uint256);
</code></pre>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

32 changes: 31 additions & 1 deletion src/PowerToken.sol/contract.PowerToken.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ <h1 class="menu-title"></h1>
<div id="content" class="content">
<main>
<h1 id="powertoken"><a class="header" href="#powertoken">PowerToken</a></h1>
<p><a href="https://github.com/RSSNext/follow-contracts/blob/0f065ffc1f37b853fe8b78644f52eefdd5a905bc/src/PowerToken.sol">Git Source</a></p>
<p><a href="https://github.com/RSSNext/follow-contracts/blob/6488639abe4f4b0408162d28b63ea7bd80396362/src/PowerToken.sol">Git Source</a></p>
<p><strong>Inherits:</strong>
ERC20Upgradeable, <a href="/src/interfaces/IPowerToken.sol/interface.IPowerToken.html">IPowerToken</a>, AccessControlEnumerable</p>
<h2 id="state-variables"><a class="header" href="#state-variables">State Variables</a></h2>
Expand All @@ -190,17 +190,47 @@ <h3 id="_pointsbalances"><a class="header" href="#_pointsbalances">_pointsBalanc
</code></pre>
<h2 id="functions"><a class="header" href="#functions">Functions</a></h2>
<h3 id="initialize"><a class="header" href="#initialize">initialize</a></h3>
<p>Initializes the contract. Setup token name and symbol.
Also The msg.sender will be the APP_ADMIN_ROLE.</p>
<pre><code class="language-solidity">function initialize(string calldata name_, string calldata symbol_) external override initializer;
</code></pre>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>name_</code></td><td><code>string</code></td><td>The name of the token.</td></tr>
<tr><td><code>symbol_</code></td><td><code>string</code></td><td>The symbol of the token.</td></tr>
</tbody></table>
</div>
<h3 id="mint"><a class="header" href="#mint">mint</a></h3>
<p>Mints new token points. The caller must have the APP_ADMIN_ROLE.</p>
<pre><code class="language-solidity">function mint(address to) external override onlyRole(APP_ADMIN_ROLE);
</code></pre>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>to</code></td><td><code>address</code></td><td>The account to receive the tokens.</td></tr>
</tbody></table>
</div>
<h3 id="tip"><a class="header" href="#tip">tip</a></h3>
<p>Tips with tokens. The caller must have the APP_ADMIN_ROLE.</p>
<p><em>The to and feedId are optional, but at least one of them must be provided.</em></p>
<pre><code class="language-solidity">function tip(uint256 amount, address to, bytes32 feedId) external override onlyRole(APP_ADMIN_ROLE);
</code></pre>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>amount</code></td><td><code>uint256</code></td><td>The amount token points to send. It can be empty.</td></tr>
<tr><td><code>to</code></td><td><code>address</code></td><td></td></tr>
<tr><td><code>feedId</code></td><td><code>bytes32</code></td><td>The feed id. It can be empty.</td></tr>
</tbody></table>
</div>
<h3 id="withdraw"><a class="header" href="#withdraw">withdraw</a></h3>
<p>Withdraws tokens by feedId. The caller must have the APP_ADMIN_ROLE.</p>
<pre><code class="language-solidity">function withdraw(address to, bytes32 feedId) external override onlyRole(APP_ADMIN_ROLE);
</code></pre>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>
<tr><td><code>to</code></td><td><code>address</code></td><td>The address who receives the tokens.</td></tr>
<tr><td><code>feedId</code></td><td><code>bytes32</code></td><td>The amount belongs to the feedId.</td></tr>
</tbody></table>
</div>
<h3 id="balanceofpoins"><a class="header" href="#balanceofpoins">balanceOfPoins</a></h3>
<pre><code class="language-solidity">function balanceOfPoins(address owner) external view override returns (uint256);
</code></pre>
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/IPowerToken.sol/interface.IPowerToken.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ <h1 class="menu-title"></h1>
<div id="content" class="content">
<main>
<h1 id="ipowertoken"><a class="header" href="#ipowertoken">IPowerToken</a></h1>
<p><a href="https://github.com/RSSNext/follow-contracts/blob/0f065ffc1f37b853fe8b78644f52eefdd5a905bc/src/interfaces/IPowerToken.sol">Git Source</a></p>
<p><a href="https://github.com/RSSNext/follow-contracts/blob/6488639abe4f4b0408162d28b63ea7bd80396362/src/interfaces/IPowerToken.sol">Git Source</a></p>
<h2 id="functions"><a class="header" href="#functions">Functions</a></h2>
<h3 id="initialize"><a class="header" href="#initialize">initialize</a></h3>
<p>Initializes the contract. Setup token name and symbol.
Expand Down

0 comments on commit 4e10b06

Please sign in to comment.