From 5f5d0ca92d39c00013ba9b6cd00745e9c760a827 Mon Sep 17 00:00:00 2001 From: tuturu-tech Date: Tue, 20 Feb 2024 12:49:15 +0100 Subject: [PATCH] fix naming in a couple of places --- .github/ISSUE_TEMPLATE/bug_report.yml | 6 ++--- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- CONTRIBUTING.md | 22 +++++++++---------- Makefile | 2 +- setup.py | 2 +- tests/conftest.py | 4 ++-- tests/test_data/src/BasicTypes.sol | 2 +- tests/test_data/src/DynamicArrays.sol | 2 +- tests/test_data/src/FixedArrays.sol | 2 +- .../src/MultiDimensionalDynamicArrays.sol | 2 +- .../src/MultiDimensionalFixedArrays.sol | 2 +- tests/test_data/src/TimeAdvancement.sol | 2 +- tests/test_data/src/TupleTypes.sol | 2 +- tests/test_data/src/ValueTransfer.sol | 2 +- 14 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index fd1681b..b3ade84 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -4,7 +4,7 @@ body: attributes: value: | Please check the issues tab to avoid duplicates. - If you are having difficulty installing test-generator, + If you are having difficulty installing fuzz-utils, please head over to the "Discussions" page. Thanks for taking the time to fill out this bug report! type: markdown @@ -27,8 +27,8 @@ body: - attributes: description: | - What version of test-generator are you running? - Run `test-generator --version` + What version of fuzz-utils are you running? + Run `fuzz-utils --version` label: "Version:" id: version type: textarea diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 75ec9c5..be6071a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -8,7 +8,7 @@ body: value: | Please check the issues tab to avoid duplicates. - Thanks for providing feedback on test-generator! + Thanks for providing feedback on fuzz-utils! - type: textarea attributes: label: Describe the desired feature diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c657a60..b8c75b1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ -# Contributing to Test-generator +# Contributing to fuzz-utils -First, thanks for your interest in contributing to `test-generator`! We welcome and appreciate all contributions, including bug reports, feature suggestions, tutorials/blog posts, and code improvements. +First, thanks for your interest in contributing to `fuzz-utils`! We welcome and appreciate all contributions, including bug reports, feature suggestions, tutorials/blog posts, and code improvements. -If you're unsure where to start, we recommend our [`good first issue`](https://github.com/crytic/test-generator/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) and [`help wanted`](https://github.com/crytic/test-generator/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issue labels. +If you're unsure where to start, we recommend our [`good first issue`](https://github.com/crytic/fuzz-utils/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) and [`help wanted`](https://github.com/crytic/fuzz-utils/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issue labels. ## Bug reports and feature suggestions @@ -14,7 +14,7 @@ Questions can be submitted to the "Discussions" page, and you may also join our ## Code -Test-generator uses the pull request contribution model. Please make an account on Github, fork this repo, and submit code contributions via pull request. For more documentation, look [here](https://guides.github.com/activities/forking/). +`fuzz-utils` uses the pull request contribution model. Please make an account on Github, fork this repo, and submit code contributions via pull request. For more documentation, look [here](https://guides.github.com/activities/forking/). Some pull request guidelines: @@ -26,7 +26,7 @@ Some pull request guidelines: ## Directory Structure -Below is a rough outline of test-generator's design: +Below is a rough outline of fuzz-utils's design: ```text . @@ -39,24 +39,24 @@ Below is a rough outline of test-generator's design: ## Development Environment -`test-generator` currently runs requires at least Python3.10 so make sure you have a sufficiently up-to-date installation by running `python --version`. We recommend [pyenv](https://github.com/pyenv/pyenv) to manage python versions. +`fuzz-utils` currently runs requires at least Python3.10 so make sure you have a sufficiently up-to-date installation by running `python --version`. We recommend [pyenv](https://github.com/pyenv/pyenv) to manage python versions. -To start working on modifications to test-generator locally, run: +To start working on modifications to fuzz-utils locally, run: ```bash -git clone https://github.com/crytic/test-generator -cd test-generator +git clone https://github.com/crytic/fuzz-utils +cd fuzz-utils make dev ``` This will create a virtual environment, ./env/, in the root of the repository and install dependencies. -To run commands using your development version of `test-generator`, run: +To run commands using your development version of `fuzz-utils`, run: ```bash source ./env/bin/activate ``` ### Setting up IDE-based debugging 1. Configure your IDE to use `./env/bin/python` as the interpreter. -2. Use `test-generator` as the entrypoint for the debugger. +2. Use `fuzz-utils` as the entrypoint for the debugger. 3. Pycharm specific: Set the environment working directory to `./env/bin/` To run the unit tests, you need to clone this repository and run `make test`. Run a specific test with `make test TESTS=$test_name`. The names of tests can be obtained with `pytest tests --collect-only`. diff --git a/Makefile b/Makefile index e94b0a0..c776d76 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ dev: $(VENV)/pyvenv.cfg .PHONY: run run: $(VENV)/pyvenv.cfg - @. $(VENV_BIN)/activate && test-generator $(ARGS) + @. $(VENV_BIN)/activate && fuzz-utils $(ARGS) $(VENV)/pyvenv.cfg: pyproject.toml # Create our Python 3 virtual environment diff --git a/setup.py b/setup.py index 354d3b9..8c0369e 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ """ -Install script for test-generator package +Install script for fuzz-utils package """ import setuptools diff --git a/tests/conftest.py b/tests/conftest.py index c203d61..e855b09 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -24,11 +24,11 @@ def __init__(self, target: str, target_path: str, corpus_dir: str): ) def echidna_generate_tests(self) -> None: - """Runs the test-generator tool for an Echidna corpus""" + """Runs the fuzz-utils tool for an Echidna corpus""" self.echidna_generator.create_poc() def medusa_generate_tests(self) -> None: - """Runs the test-generator tool for a Medusa corpus""" + """Runs the fuzz-utils tool for a Medusa corpus""" self.medusa_generator.create_poc() diff --git a/tests/test_data/src/BasicTypes.sol b/tests/test_data/src/BasicTypes.sol index edb658f..0b51c3e 100644 --- a/tests/test_data/src/BasicTypes.sol +++ b/tests/test_data/src/BasicTypes.sol @@ -1,7 +1,7 @@ pragma solidity ^0.8.0; // Ran from test directory: echidna . --contract BasicTypes --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-basic --crytic-args "--foundry-ignore-compile" -// Ran from test directory: test-generator ./src/BasicTypes.sol --corpus-dir echidna-corpora/corpus-basic --contract "BasicTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna +// Ran from test directory: fuzz-utils ./src/BasicTypes.sol --corpus-dir echidna-corpora/corpus-basic --contract "BasicTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna contract BasicTypes { // ------------------------------ diff --git a/tests/test_data/src/DynamicArrays.sol b/tests/test_data/src/DynamicArrays.sol index 123b327..a5ebae4 100644 --- a/tests/test_data/src/DynamicArrays.sol +++ b/tests/test_data/src/DynamicArrays.sol @@ -1,7 +1,7 @@ pragma solidity ^0.8.0; // Ran from test directory: echidna . --contract DynamicArrays --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-dyn-arr --crytic-args "--foundry-ignore-compile" -// Ran from test directory: test-generator ./src/DynamicArrays.sol --corpus-dir echidna-corpora/corpus-dyn-arr --contract "DynamicArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna +// Ran from test directory: fuzz-utils ./src/DynamicArrays.sol --corpus-dir echidna-corpora/corpus-dyn-arr --contract "DynamicArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna contract DynamicArrays { // ------------------------------ diff --git a/tests/test_data/src/FixedArrays.sol b/tests/test_data/src/FixedArrays.sol index a7260b0..1982518 100644 --- a/tests/test_data/src/FixedArrays.sol +++ b/tests/test_data/src/FixedArrays.sol @@ -1,7 +1,7 @@ pragma solidity ^0.8.0; // Ran from test directory: echidna . --contract FixedArrays --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-fixed-arr --crytic-args "--foundry-ignore-compile" -// Ran from test directory: test-generator ./src/FixedArrays.sol --corpus-dir echidna-corpora/corpus-fixed-arr --contract "FixedArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna +// Ran from test directory: fuzz-utils ./src/FixedArrays.sol --corpus-dir echidna-corpora/corpus-fixed-arr --contract "FixedArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna contract FixedArrays { // ------------------------------ diff --git a/tests/test_data/src/MultiDimensionalDynamicArrays.sol b/tests/test_data/src/MultiDimensionalDynamicArrays.sol index 67bdcc9..03d090b 100644 --- a/tests/test_data/src/MultiDimensionalDynamicArrays.sol +++ b/tests/test_data/src/MultiDimensionalDynamicArrays.sol @@ -1,7 +1,7 @@ pragma solidity ^0.8.0; // Ran from test directory: echidna . --contract MultiDimensionalDynamicArrays --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-multi-dyn-arr --crytic-args "--foundry-ignore-compile" -// Ran from test directory: test-generator ./src/MultiDimensionalDynamicArrays.sol --corpus-dir echidna-corpora/corpus-multi-dyn-arr --contract "MultiDimensionalDynamicArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna +// Ran from test directory: fuzz-utils ./src/MultiDimensionalDynamicArrays.sol --corpus-dir echidna-corpora/corpus-multi-dyn-arr --contract "MultiDimensionalDynamicArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna contract MultiDimensionalDynamicArrays { // ----- 2-dimensional arrays ------ diff --git a/tests/test_data/src/MultiDimensionalFixedArrays.sol b/tests/test_data/src/MultiDimensionalFixedArrays.sol index 2f594f2..6701208 100644 --- a/tests/test_data/src/MultiDimensionalFixedArrays.sol +++ b/tests/test_data/src/MultiDimensionalFixedArrays.sol @@ -1,7 +1,7 @@ pragma solidity ^0.8.0; // Ran from test directory: echidna . --contract MultiDimensionalFixedArrays --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-multi-fixed-arr --crytic-args "--foundry-ignore-compile" -// Ran from test directory: test-generator ./src/MultiDimensionalFixedArrays.sol --corpus-dir echidna-corpora/corpus-multi-fixed-arr --contract "MultiDimensionalFixedArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna +// Ran from test directory: fuzz-utils ./src/MultiDimensionalFixedArrays.sol --corpus-dir echidna-corpora/corpus-multi-fixed-arr --contract "MultiDimensionalFixedArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna contract MultiDimensionalFixedArrays { /* ----- 2-dimensional arrays */ diff --git a/tests/test_data/src/TimeAdvancement.sol b/tests/test_data/src/TimeAdvancement.sol index 70e1eed..452e226 100644 --- a/tests/test_data/src/TimeAdvancement.sol +++ b/tests/test_data/src/TimeAdvancement.sol @@ -1,7 +1,7 @@ pragma solidity ^0.8.0; // Ran from test directory: echidna . --contract TimeAdvancement --test-mode assertion --test-limit 10000 --corpus-dir echidna-corpora/corpus-time --crytic-args "--foundry-ignore-compile" -// Ran from test directory: test-generator ./src/TupleTypes.sol --corpus-dir echidna-corpora/corpus-struct --contract "TupleTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna +// Ran from test directory: fuzz-utils ./src/TupleTypes.sol --corpus-dir echidna-corpora/corpus-struct --contract "TupleTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna contract TimeAdvancement { bool timeSet; diff --git a/tests/test_data/src/TupleTypes.sol b/tests/test_data/src/TupleTypes.sol index df6e404..81c56af 100644 --- a/tests/test_data/src/TupleTypes.sol +++ b/tests/test_data/src/TupleTypes.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.0; import "./IStruct.sol"; // Ran from test directory: echidna . --contract TupleTypes --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-struct --crytic-args "--foundry-ignore-compile" -// Ran from test directory: test-generator ./src/TupleTypes.sol --corpus-dir echidna-corpora/corpus-struct --contract "TupleTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna +// Ran from test directory: fuzz-utils ./src/TupleTypes.sol --corpus-dir echidna-corpora/corpus-struct --contract "TupleTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna contract TupleTypes { struct ElementaryStruct { uint256 uintType; diff --git a/tests/test_data/src/ValueTransfer.sol b/tests/test_data/src/ValueTransfer.sol index 0ca8237..8f162cf 100644 --- a/tests/test_data/src/ValueTransfer.sol +++ b/tests/test_data/src/ValueTransfer.sol @@ -1,7 +1,7 @@ pragma solidity ^0.8.0; // Ran from tests/test_data/ directory: echidna . --contract ValueTransfer --test-mode assertion --test-limit 1000000 --corpus-dir echidna-corpora/corpus-value -// Ran from tests/test_data/ directory: test-generator ./src/ValueTransfer.sol --corpus-dir echidna-corpora/corpus-value --contract "ValueTransfer" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna +// Ran from tests/test_data/ directory: fuzz-utils ./src/ValueTransfer.sol --corpus-dir echidna-corpora/corpus-value --contract "ValueTransfer" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna contract ValueTransfer { function check_balance() public {