Comments (3)
Hi!,
The correct command is echidna
, not echidna-test
. Besides that, the crytic-compile issue should be reported in their issue tracker. Let's close this one.
from echidna.
Hi! You should also specify the contract name with --contract
, e.g. echidna solution.sol --contract TestToken
The first error is unintuitive, but it's usually seen when the specified file does not exist. Check that you are in the correct directory and that you can see your file with ls
from echidna.
The echidna
command seems to only work when you are in the folder of the test file and having solc-select installed and using the correct version is a must.
Although using this method will still find errors when importing solidity files from other folders
echidna TestSwapFactory.sol --contract TestSwapFactory
[2023-11-29 17:23:37.81] Compiling TestSwapFactory.sol... Done! (0.337096s)
echidna: Couldn't compile given file
stdout:
stderr:
INFO:CryticCompile:'solc --version' running
INFO:CryticCompile:'solc TestSwapFactory.sol --combined-json abi,ast,bin,bin-runtime,srcmap,srcmap-runtime,userdoc,devdoc,hashes --allow-paths .,/Users/redacted/Documents/Solidity/redacted/swaplace-contracts/contracts/audit' running
ERROR:CryticCompile:Invalid solc compilation Error: Source "SwapFactory.sol" not found: File not found. Searched the following locations: "".
--> TestSwapFactory.sol:4:1:
|
4 | import "../SwapFactory.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "../SwapFactory.sol";
contract TestSwapFactory is SwapFactory {
function echidna_alwaystrue() public returns (bool) {
return (true);
}
function echidna_revert_always() public returns (bool) {
revert();
}
}
When using the following command on the main hardhat folder, I manage to run the tests above. But notice that the contract file with .sol
extension was not mentioned...
echidna . --contract TestSwapFactory
from echidna.
Related Issues (20)
- Support `startPrank` and `stopPrank`
- Feature Request: Option to disable Etherscan downloads with onchain fuzzing HOT 3
- [Bug-Candidate]: Sequences from corpus do not adhere to time/block delay settings HOT 4
- Feature Request: Support for logging in view functions like Foundry's `console2` HOT 1
- [Bug-Candidate]: HOT 5
- [Bug-Candidate]: Coverage report doesn't display fuzzing contract in html unless an assertion fails HOT 1
- [Bug-Candidate]: no fore color support for terminal xterm-256color HOT 4
- [Bug-Candidate]: `Cannot decode byte '\xe4': Data.Text.Encoding: Invalid UTF-8 stream` HOT 9
- Improve error message on MaxInitCodeSizeExceeded issue HOT 3
- Improve error message if the function hashmap is not detected HOT 3
- [Bug-Candidate]: Internal Error: TODO: implement copySlice with a symbolically sized region HOT 4
- Feature Request: Add setting to consider reverted tests as failed in assertion mode HOT 1
- Shrinking multicore HOT 3
- update number of workers to a decent default
- warn when seqLen > 1 and there haven't been any SLOAD/SSTORE in target HOT 1
- Allow Configurable Verbosity HOT 1
- [Bug-Candidate]: Contract is "unknown contract" but should be able to be identified HOT 2
- Have multiple workers to speed up fetching slots HOT 3
- [Bug-Candidate]: A simple contract took onchain fuzzer extremely long time to run due to zero calls per second HOT 2
- add call sequence mutation that removes all reverting txs in the sequences HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from echidna.