Skip to content

Commit

Permalink
update readme, add requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
tuturu-tech committed Feb 6, 2024
1 parent 749ff23 commit 072a126
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<img src="./logo.png" alt="Slither Static Analysis Framework Logo" width="500" />

# Automated tool for generating Foundry unit tests for smart contract fuzzer failed properties
# Automated tool for generating Foundry unit tests from smart contract fuzzer failed properties

`test-generator` is a Python tool that generates unit tests from [Echidna](https://github.com/crytic/echidna) and [Medusa](https://github.com/crytic/medusa/tree/master) failed properties, using the generated reproducer files. It uses [Slither](https://github.com/crytic/slither) for determining types and jinja2 for generating the test files using string templates.

**Disclaimer**: Please note that `test-generator` is **under development**. Currently, not all Solidity types are supported and some types (like `bytes*`, and `string`) might be improperly decoded from the corpora call sequences.
**Disclaimer**: Please note that `test-generator` is **under development**. Currently, not all Solidity types are supported and some types (like `bytes*`, and `string`) might be improperly decoded from the corpora call sequences. We are investigating a better corpus format that will ease the creation of unit tests.

## Features
`test-generator` provides support for:
- ✔️ Generating Foundry unit tests from the fuzzer corpus of single entry point fuzzing harnesses
- ✔️ Medusa and Echidna corpora
- ✔️ Solidity types: `bool`,`uint*`, `int*`, `address`, `struct`, `enum`, single-dimensional fixed-size arrays and dynamic arrays, multi-dimensional fixed-size arrays.

Multi-dimensional dynamic arrays, function pointers, and other more complex types are in the works, but are currently not supported.
## Installation and pre-requisites

In order to be able to use `test-generator`, you will need to install it first:
Expand Down Expand Up @@ -47,4 +48,4 @@ Additional options are available for the script:
For information about how to contribute to this project, check out the [CONTRIBUTING](CONTRIBUTING.md) guidelines.

## License
test-generator is licensed and distributed under the [AGPLv3](LICENSE).
`test-generator` is licensed and distributed under the [AGPLv3](LICENSE).
67 changes: 67 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
aiohttp==3.9.1
aiosignal==1.3.1
astroid==2.11.2
async-timeout==4.0.3
attrs==23.2.0
bitarray==2.9.2
cbor2==5.5.1
certifi==2023.11.17
charset-normalizer==3.3.2
colorama==0.4.6
crytic-compile==0.3.5
cytoolz==0.12.2
dill==0.3.4
eth-abi==4.2.1
eth-account==0.10.0
eth-hash==0.5.2
eth-keyfile==0.7.0
eth-keys==0.4.0
eth-rlp==1.0.0
eth-typing==3.5.2
eth-utils==2.3.1
exceptiongroup==1.2.0
frozenlist==1.4.1
hexbytes==0.3.1
idna==3.6
iniconfig==2.0.0
isort==5.10.1
Jinja2==3.1.2
jsonschema==4.20.0
jsonschema-specifications==2023.12.1
lazy-object-proxy==1.7.1
lru-dict==1.2.0
MarkupSafe==2.1.3
mccabe==0.7.0
multidict==6.0.4
mypy==1.2.0
mypy-extensions==1.0.0
packaging==23.2
parsimonious==0.9.0
platformdirs==2.5.1
pluggy==1.3.0
prettytable==3.9.0
protobuf==4.25.1
pycryptodome==3.20.0
pylint==2.13.2
pytest==7.4.4
pyunormalize==15.1.0
referencing==0.32.1
regex==2023.12.25
requests==2.31.0
rlp==4.0.0
rpds-py==0.16.2
slither-analyzer==0.10.0
solc-select==1.0.4
-e git+https://github.com/crytic/test-generator.git@749ff23ee678a2353f95dadd19accb18f78d74e5#egg=test_generator
toml==0.10.2
tomli==2.0.1
tomlkit==0.12.3
toolz==0.12.0
types-setuptools==69.0.0.20240106
typing_extensions==4.1.1
urllib3==2.1.0
wcwidth==0.2.13
web3==6.13.0
websockets==12.0
wrapt==1.14.0
yarl==1.9.4

0 comments on commit 072a126

Please sign in to comment.