crytic / crytic/echidna

Feature Request: allow fuzzing arguments of `echidna_` functions

Open
#869 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
3.2k
Forks
432
Avg merge
1d 20h
Merged PRs (30d)
5

Description

I have the following test contract.
```solidity
contract EchidnaTest {
function echidna_test(uint256 arg) public returns (bool) {
return arg != 123;
}
}
```
Running `echidna-test` tells me
```
echidna-test: Test "echidna_test" has arguments, aborting
```
Is there a reason to not allow fuzzing arguments for this test function?
Is the idea that invariants/properties should be system-wide and not require any specific arguments to perform?

I know I can get the desired behaviour by using `--test-mode assertion` and re-writing the function like this, but why should the first method not work?
```solidity
contract EchidnaTest {
function test(uint256 arg) public {
assert(arg != 123);
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.