• Stars
    star
    423
  • Rank 102,544 (Top 3 %)
  • Language
    Rust
  • Created about 2 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Solidity static analyzer to identify contract vulnerabilities and gas efficiencies.

solstat

A Solidity static analyzer to identify contract vulnerabilities and gas efficiencies.

.------. .------. .------. .------. .------. .------. .------.
|S.--. | |O.--. | |L.--. | |S.--. | |T.--. | |A.--. | |T.--. |
| :/\: | | :/\: | | :/\: | | :/\: | | :/\: | | (\/) | | :/\: |
| :\/: | | :\/: | | (__) | | :\/: | | (__) | | :\/: | | (__) |
| '--'S| | '--'O| | '--'L| | '--'S| | '--'T| | '--'A| | '--'T|
`------' `------' `------' `------' `------' `------' `------'

Table of Contents

 

Installation

First, make sure that you have Rust installed. Then you can choose either of the installation methods by entering the corresponding command in your terminal below.

 

Install from crates.io

cargo install solstat

 

Install from source

git clone https://github.com/0xKitsune/solstat &&
cd solstat &&
cargo install --path .

 

Usage

Now that you have solstat involved, you can use the solstat command from anywhere in your terminal. By default, solstat looks for a ./contracts directory and analyzes every file within the folder. If you would like to specify the directory solstat should use, you can pass the --path flag (ex. solstat --path <path_to_dir>).

In the default configuration, solstat runs analysis for every currently included Optimization, Vulnerability and QA, however if you would like to run analysis for select patterns, you can create a .toml file for your custom configuration. Check out the default solstat.toml configuration for reference. After creating a custom .toml file, make sure to pass the --toml flag when running solstat (ex. solstat --toml <path_to_toml_file>).

Once solstat runs its analysis, a report will be generated and output as solstat_report.md.

At any point you can use solstat --help to see a list of all commands and options.

Usage: solstat [OPTIONS]

Options:
  -p, --path <PATH>  Path to the directory containing the files solstat will analyze. The default directory is `./contracts`
  -t, --toml <TOML>  Path to the toml file containing the solstat configuration when not using the default settings.
  -h, --help         Print help information

 

Contributing

First off, thanks for taking the time to contribute! Contributions are welcomed and greatly appreciated.

If you are interested in contributing, please check out Contributing.md.

More Repositories

1

EVM-Book

A collection of EVM related information.
321
star
2

cfmms-rs

The predecessor to `amms-rs`. CFMM lib built in Rust enabling pair syncing and swap simulation with pools on Ethereum.
Rust
274
star
3

uniswap-v3-math

Rust
242
star
4

Foundry-Vyper

A Foundry template to compile and test Vyper contracts.
Solidity
173
star
5

Ghost-Contract

A minimalistic contract to execute a payload and make the code size of the msg.sender appear to be 0.
Solidity
138
star
6

Tour-of-ethers-rs

A comprehensive walkthrough of all the nooks and crannies ethers-rs has to offer.
96
star
7

EVM-Gas-Optimizations

A collection of gas optimizations for the EVM.
90
star
8

sstan

Solidity static analyzer
Rust
80
star
9

Foundry-Huff

A Foundry template to compile and test Huff contracts.
Solidity
52
star
10

bid_ask_service

Rust
45
star
11

evm-mnemonic

A barebones framework for hand tuned smart contracts in pure opcodes.
Rust
45
star
12

EVM-Puzzles-Walkthrough

39
star
13

openai-rs

A simple and efficient wrapper around the OpenAI API
Rust
28
star
14

gas-lab

A quick and easy way to test gas optimizations.
Solidity
27
star
15

burn_operation

Securely wipe your computer at the speed of light.
Rust
26
star
16

Optimized-Merkle-Proof

Solidity
17
star
17

solstat-reports

Smart contract audit / optimization reports generated by solstat.
Solidity
14
star
18

discord-openai

Discord x OpenAI bot
Rust
14
star
19

magglob-rs

Modular aggregated order book for CeFi exchanges
Rust
14
star
20

Optimized-Patricia-Tree

A modern, optimized Merkle Patricia Trie implementation.
Solidity
10
star
21

HFT-Research

8
star
22

ethers-throttle

A lightweight wrapper for ethers providers to throttle requests.
Rust
6
star
23

A-Journey-To-The-Center-Of-The-Node

A detailed walkthrough into the black box of node clients.
5
star
24

Reproducible-Go-Binaries

Makefile
5
star
25

casol

A hyper optimized chess engine.
Rust
5
star
26

geth-ipc-rpc-bench

Benchmarks comparing Geth's IPC and RPC endpoints.
Go
4
star
27

world-id-relay

State bridge relay for WorldID
Rust
2
star
28

tx-relay

Rust
2
star
29

RussianRoulette

Solidity
1
star
30

tx-monitor

Rust
1
star
31

Easy-Kali

Python
1
star