Skip to content

Commit

Permalink
(doc) Docker documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-valerio committed Nov 28, 2024
1 parent 3074e5f commit 854249f
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
run: docker build -t phink .

- name: Run Docker Phink with --help
run: docker run --rm phink --help #just checking if phink works properly
run: docker run --rm phink cargo run -- help #just checking if phink works properly
6 changes: 3 additions & 3 deletions README.Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ includes:
2. **Running Phink**:
To run Phink with the default command (running the default example):
```bash
docker run --rm "cargo run"
docker run --rm phink cargo run
```

To specify a different contract for instrumentation:
```bash
docker run --rm "cargo run -- instrument <path_to_your_contract>"
docker run --rm phink cargo run -- instrument <path_to_your_contract>"
```
To fuzz your instrumented ink! smart-contract:
```bash
docker run --rm "cargo run -- fuzz"
docker run --rm phink cargo run -- fuzz
```
### Notes
Expand Down
34 changes: 11 additions & 23 deletions book/documentation/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -942,13 +942,13 @@ <h3 id="support-channels"><a class="header" href="#support-channels">Support cha
<h3 id="benchmarks"><a class="header" href="#benchmarks">Benchmarks</a></h3>
<div class="table-wrapper"><table><thead><tr><th>Contract name</th><th>Coverage percent</th><th>Average speed (<em>execs/sec</em>)</th><th>AFL++ corpus size</th><th>Using Phink seed generation</th></tr></thead><tbody>
<tr><td>abax_governor</td><td><strong>48%</strong></td><td>1500 (early phase) <strong>and</strong> 100 (late phase)</td><td>1639</td><td><strong>NO</strong> (no tests available)</td></tr>
<tr><td>erc1155</td><td><strong>63%</strong></td><td>1300 (early phase phase) <strong>and</strong> 134 (late phase)</td><td>561</td><td><strong>YES</strong> (without E2E)</td></tr>
<tr><td>erc1155</td><td><strong>66%</strong></td><td>1300 (early phase phase) <strong>and</strong> 134 (late phase)</td><td>561</td><td><strong>YES</strong> (without E2E)</td></tr>
<tr><td>multisig</td><td><strong>91%</strong></td><td>1400 (early phase phase) <strong>and</strong> 113 (late phase)</td><td>1524</td><td><strong>YES</strong> (without E2E)</td></tr>
</tbody></table>
</div>
<ul>
<li>Github for
<code>abax_governor</code> : <a href="https://github.com/AbaxFinance/dao-contracts/tree/main/src/contracts/abax_governor">AbaxFinance/dao-contracts/tree/main/src/contracts/abax_governor</a></li>
<code>abax_governor</code> : <a href="https://github.com/AbaxFinance/dao-contracts/tree/main/src/contracts/abax_governor/">AbaxFinance/dao-contracts/tree/main/src/contracts/abax_governor</a></li>
<li>Github for
<code>multisig</code> : <a href="https://github.com/use-ink/ink-examples/blob/main/multisig/lib.rs">use-ink/ink-examples/blob/main/multisig/lib.rs</a></li>
<li>Github for
Expand All @@ -957,33 +957,21 @@ <h3 id="benchmarks"><a class="header" href="#benchmarks">Benchmarks</a></h3>
<h4 id="contracts"><a class="header" href="#contracts">Contracts</a></h4>
<h6 id="erc-1155"><a class="header" href="#erc-1155">ERC-1155</a></h6>
<blockquote>
<p>The ERC-1155 standard is a versatile framework designed to manage a diverse range of assets within a single contract.
This contract type supports both fungible and non-fungible tokens, allowing for efficient and flexible asset
management.
One of the key features of the ERC-1155 contract is its ability to perform batch transfers, enabling multiple token
transfers in a single transaction. This functionality simplifies complex operations and makes managing various tokens
more streamlined and cost-effective. By combining multiple asset types, ERC-1155 provides developers with a powerful
tool for creating diverse and dynamic digital environments.</p>
<p>The ERC-1155 contract is a standard for creating multiple token types within a single contract. It allows for the
creation of both fungible and non-fungible tokens and enables batch transfers, making it easy to transfer multiple
tokens at once.</p>
</blockquote>
<h6 id="multisig-wallet"><a class="header" href="#multisig-wallet">Multisig Wallet</a></h6>
<blockquote>
<p>The Multisig Wallet is a smart contract that facilitates collaborative decision-making among multiple owners. This
example contract, inspired by the Gnosis multisig wallet, allows a group of owners to jointly manage and execute
transactions. Each multisig wallet establishes a set number of required approvals from its owners to execute any
proposed transaction, ensuring a democratic and secure management process. Although this implementation serves
educational purposes and is not intended for production, it illustrates the importance of shared control and risk
mitigation in decentralized financial operations.</p>
<p>The Multisig Wallet contract is a multi-owner wallet that requires a certain number of owners to agree on a
transaction before it can be executed. Each owner can submit a transaction, and when enough owners confirm, it can be
executed.</p>
</blockquote>
<h6 id="abaxgovernor"><a class="header" href="#abaxgovernor">AbaxGovernor</a></h6>
<blockquote>
<p>The AbaxGovernor contract is centered around governance and participation through staking mechanisms. It allows users
to
stake the Abax token, a PSP22 token, in exchange for PSP22Vault shares, which are used as voting power or “votes.”
This
contract facilitates the creation, proposal, and voting on governance decisions by leveraging the Govern trait. It
includes various voting phases and uses the GeneralVest contract to manage unstaking after a specified period. The
AbaxGovernor is particularly focused on ensuring responsible governance participation and enabling stakeholders to
influence important protocol decisions through their voting power.</p>
<p>The Abax Governor contract is a governance contract that allows for staking of PSP22 tokens in exchange for
non-transferrable PSP22Vault shares (votes). It enables users to propose and vote on proposals, with the number of
shares held by a user determining their voting power.</p>
</blockquote>
<h3 id="explanation-of-terms"><a class="header" href="#explanation-of-terms">Explanation of terms</a></h3>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion book/documentation/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion book/documentation/searchindex.json

Large diffs are not rendered by default.

34 changes: 11 additions & 23 deletions book/src/BENCHMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ lines covered divided the number of reachable lines, as a percentage.
| Contract name | Coverage percent | Average speed (_execs/sec_) | AFL++ corpus size | Using Phink seed generation |
|---------------|------------------|---------------------------------------------------|-------------------|-----------------------------|
| abax_governor | **48%** | 1500 (early phase) **and** 100 (late phase) | 1639 | **NO** (no tests available) |
| erc1155 | **63%** | 1300 (early phase phase) **and** 134 (late phase) | 561 | **YES** (without E2E) |
| erc1155 | **66%** | 1300 (early phase phase) **and** 134 (late phase) | 561 | **YES** (without E2E) |
| multisig | **91%** | 1400 (early phase phase) **and** 113 (late phase) | 1524 | **YES** (without E2E) |

- Github for
`abax_governor` : [AbaxFinance/dao-contracts/tree/main/src/contracts/abax_governor](https://github.com/AbaxFinance/dao-contracts/tree/main/src/contracts/abax_governor)
`abax_governor` : [AbaxFinance/dao-contracts/tree/main/src/contracts/abax_governor](https://github.com/AbaxFinance/dao-contracts/tree/main/src/contracts/abax_governor/)
- Github for
`multisig` : [use-ink/ink-examples/blob/main/multisig/lib.rs](https://github.com/use-ink/ink-examples/blob/main/multisig/lib.rs)
- Github for
Expand All @@ -32,33 +32,21 @@ lines covered divided the number of reachable lines, as a percentage.

###### ERC-1155

> The ERC-1155 standard is a versatile framework designed to manage a diverse range of assets within a single contract.
> This contract type supports both fungible and non-fungible tokens, allowing for efficient and flexible asset
> management.
> One of the key features of the ERC-1155 contract is its ability to perform batch transfers, enabling multiple token
> transfers in a single transaction. This functionality simplifies complex operations and makes managing various tokens
> more streamlined and cost-effective. By combining multiple asset types, ERC-1155 provides developers with a powerful
> tool for creating diverse and dynamic digital environments.
> The ERC-1155 contract is a standard for creating multiple token types within a single contract. It allows for the
> creation of both fungible and non-fungible tokens and enables batch transfers, making it easy to transfer multiple
> tokens at once.
###### Multisig Wallet

> The Multisig Wallet is a smart contract that facilitates collaborative decision-making among multiple owners. This
> example contract, inspired by the Gnosis multisig wallet, allows a group of owners to jointly manage and execute
> transactions. Each multisig wallet establishes a set number of required approvals from its owners to execute any
> proposed transaction, ensuring a democratic and secure management process. Although this implementation serves
> educational purposes and is not intended for production, it illustrates the importance of shared control and risk
> mitigation in decentralized financial operations.
> The Multisig Wallet contract is a multi-owner wallet that requires a certain number of owners to agree on a
> transaction before it can be executed. Each owner can submit a transaction, and when enough owners confirm, it can be
> executed.
###### AbaxGovernor

> The AbaxGovernor contract is centered around governance and participation through staking mechanisms. It allows users
> to
> stake the Abax token, a PSP22 token, in exchange for PSP22Vault shares, which are used as voting power or "votes."
> This
> contract facilitates the creation, proposal, and voting on governance decisions by leveraging the Govern trait. It
> includes various voting phases and uses the GeneralVest contract to manage unstaking after a specified period. The
> AbaxGovernor is particularly focused on ensuring responsible governance participation and enabling stakeholders to
> influence important protocol decisions through their voting power.
> The Abax Governor contract is a governance contract that allows for staking of PSP22 tokens in exchange for
> non-transferrable PSP22Vault shares (votes). It enables users to propose and vote on proposals, with the number of
> shares held by a user determining their voting power.
### Explanation of terms

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ enum Commands {
/// Seed to be executed
seed: PathBuf,
},
/// Minimize the corpus taken from `corpus/`
/// Minimize the corpus taken from `corpus/` (unstable, not recommended)
Minimize,
}

Expand Down

0 comments on commit 854249f

Please sign in to comment.