Skip to content

Commit

Permalink
Dashboard GIF
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-valerio committed Oct 21, 2024
1 parent 42f2ee9 commit 6d5ee7a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 146 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ std = [
"parity-scale-codec/std",
"scale-info/std",
]
skip-integrity-tests = []


[dev-dependencies]
Expand Down
45 changes: 25 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

</div>
</br>

**Phink** is a blazing-fast⚡, property-based, coverage-guided fuzzer for ink! smart contracts. It enables developers to
embed inviolable properties into their smart contract testing workflows, equipping them with automatic tools to detect
vulnerabilities and ensure contract reliability before deployment.

<img src="assets/dashboard.gif" alt="Dashboard GIF" width="750"/>

For documentation, visit
our [**documentation site here**](https://srlabs.github.io/phink/). If you have any question, feedback,
features suggestion, join our [Discord](https://discord.gg/gAahQMGE).
Expand All @@ -30,7 +31,17 @@ features suggestion, join our [Discord](https://discord.gg/gAahQMGE).

### Building from source

From Cargo via Git
#### Requirements

##### Install the requirements, configure AFL++ plugins and adapt the system configs

```bash
cargo install --force ziggy cargo-afl honggfuzz grcov cargo-contract --locked
cargo afl config --build --plugins --verbose --force # don't use `--plugins` if you're on macOS
sudo cargo-afl afl system-config
```

##### Install Phink

```bash
cargo install --git https://github.com/srlabs/phink
Expand All @@ -41,50 +52,44 @@ If you prefer to install Phink manually, follow these steps:

```bash
git clone https://github.com/kevin-valerio/phink
cd phink/
cargo install --force ziggy cargo-afl honggfuzz grcov cargo-contract --locked
cargo afl config --build --plugins --verbose --force # don't use `--plugins` if you're on macOS
sudo cargo-afl afl system-config
cargo build --release
cd phink/ && cargo build --release
./target/release/phink --help
```

### Using Docker
##### Install Phink via Docker

Alternatively, you can use Docker to set up and run Phink without needing to manually install dependencies. Detailed
instructions are available in [README.Docker.md](README.Docker.md).

To build the Docker image:
instructions are available in [README.Docker.md](README.Docker.md). To build the Docker image:

```bash
docker build -t phink .
```

## Usage

### Docker Usage
### Via normal installation

```bash
phink instrument path/to/ink_contract
phink fuzz
```

### If installed via Docker

To use Phink via Docker, you can run:

```bash
docker run --rm phink
```

For instrumenting a specific contract:
For instrumenting a contract:

```bash
docker run --rm phink instrument path/to/ink_contract
```

_Refer to [README.Docker.md](README.Docker.md) for more detailed instructions on using Phink with Docker._

### Manual Usage

```bash
phink instrument path/to/ink_contract
phink fuzz
```

## Example

#### Adding some invariants
Expand Down
Binary file added assets/dashboard.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed render1729505316546.gif
Binary file not shown.
125 changes: 0 additions & 125 deletions terminalizer.yml

This file was deleted.

0 comments on commit 6d5ee7a

Please sign in to comment.