> ⚠️ **Installing via crates is no longer fully supported. `cyfrinup` is the preferred installation method.**.
>
> For the best experience, please remove the legacy crate installation by running `cargo uninstall aderyn`, and use `cyfrinup` instead.
>
> Full install instructions are [here](#installation).
A powerful Solidity static analyzer that takes a bird's eye view over your smart contracts.
Docs
Get support
Website
Twitter
---
[![Stargazers][stars-shield]][stars-url] [![Forks][forks-shield]][forks-url]
[![Contributors][contributors-shield]][contributors-url]
[![Issues][issues-shield]][issues-url]
[![GPL-3.0 License][license-shield]][license-url]
## What is Aderyn?
**Aderyn is an open-source public good developer tool.** It is a Rust-based solidity smart contract static analyzer designed to help protocol engineers and security researchers find vulnerabilities in Solidity code bases.
Thanks to its collection of static vulnerability detectors, running Cyfrin Aderyn on your Solidity codebase will **highlight potential vulnerabilities**, drastically reducing the potential for unknown issues in your Solidity code and giving you the time to focus on more complex problems.
Built using **Rust**, Aderyn integrates seamlessly into small and **enterprise-level development workflows**, offering lighting-fast command-line functionality and a framework to [build custom detectors](https://docs.cyfrin.io/aderyn-custom-detectors/what-is-a-detector) to adapt to your codebase.
You can read the [Cyfrin official documentation](https://docs.cyfrin.io) for an in-depth look at Aderyn's functionalities.
## Features
* Supports any development framework (Foundry/Hardhat/Truffle/etc)
* Modular [detectors](../aderyn_core/src/detect/)
* AST Traversal
* Markdown reports
## Installation
**Suggested VSCode extensions:**
[rust-analyzer](https://marketplace.visualstudio.com/items?itemName=dustypomerleau.rust-syntax) - Rust language support for Visual Studio Code
[Rust Syntax](https://marketplace.visualstudio.com/items?itemName=dustypomerleau.rust-syntax) - Improved Rust syntax highlighting
### Using Cyfrinup
> Note: If you previously installed aderyn using cargo, run `cargo uninstall aderyn` before using `cyfrinup` to avoid conflicts.
#### Step 1: Install Cyfrinup
Cyfrinup is a CLI tool that simplifies the installation and management of Cyfrin tools. To install Cyfrinup, run the following command in your terminal:
```sh
curl -L https://raw.githubusercontent.com/Cyfrin/aderyn/dev/cyfrinup/install | bash
```
#### Step 2: Update Path
The installer will prompt you to run a `source` command. Either run this command, or reload your terminal.
#### Step 3: Install Aderyn using Cyfrinup
After installing Cyfrinup, you can use it to install Aderyn. Run the following command in your terminal:
```sh
cyfrinup
```
#### Step 4: Verify installation
```sh
aderyn --version
```
#### Future Updates
To update Aderyn to the latest version, you can run the cyfrinup:
```sh
cyfrinup
```
Cyfrinup will replace the existing version with the latest one.
## Quick Start
Once Aderyn is installed on your system, you can run it against your Foundry-based codebase to find vulnerabilities in your code.
We will use the [aderyn-contracts-playground](https://github.com/Cyfrin/aderyn-contracts-playground) repository in this example. You can follow along by cloning it to your system:
```sh
git clone https://github.com/Cyfrin/aderyn-contracts-playground.git
```
Navigate inside the repository:
```sh
cd aderyn-contracts-playground
```
We usually use several smart contracts and tests to try new detectors. Build the contracts by running:
```sh
forge build
```
Once your smart contracts have been successfully compiled, run Aderyn using the following command:
```sh
aderyn [OPTIONS] path/to/your/project
```
Replace [OPTIONS] with specific command-line arguments as needed.
For an in-depth walkthrough on how to get started using Aderyn, check the [Cyfrin official docs](https://docs.cyfrin.io/aderyn-static-analyzer/quickstart)
### Arguments
Usage: `aderyn [OPTIONS] `
``: The path to the root of the codebase to be analyzed. Defaults to the current directory.
Options:
- `-s`, `--src`: Path to the source contracts. If not provided, or if aderyn can't find famous files to read (like `foundry.toml`, which it automatically searches for) the ROOT directory will be used.
- In foundry projects, this is usually the `src/` folder unless stated otherwise in `foundry.toml`.
- In Hardhat projects, this is usually the `contracts/` folder unless stated otherwise in the config.
- `-i`, `--path-includes `: List of path strings to include, delimited by comma (no spaces). Any solidity file path not containing these strings will be ignored
- `-x`, `--path-excludes `: List of path strings to exclude, delimited by comma (no spaces). Any solidity file path containing these strings will be ignored
- `-o`, `--output