crytic / crytic-compile

Abstraction layer for smart contract build systems
GNU Affero General Public License v3.0
157 stars 84 forks source link

getting error while testing using echidna #284

Open MadhanBlockMath opened 2 years ago

MadhanBlockMath commented 2 years ago

echidna-test: Couldn't compile given file stdout: stderr: Traceback (most recent call last): File "/home/madhankumar/.local/bin/crytic-compile", line 8, in sys.exit(main()) File "/home/madhankumar/.local/lib/python3.8/site-packages/crytic_compile/main.py", line 192, in main compilations = compile_all(**vars(args)) File "/home/madhankumar/.local/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 660, in compile_all raise ValueError(f"Unresolved target: {str(target)}") ValueError: Unresolved target: mojito/sothebys/MarketPlace.sol

need help to how to solve this issue

elopez commented 2 years ago

Hi @MadhanBlockMath, that error indicates that the target file does not exist. Make sure the mojito/sothebys/MarketPlace.sol file is there and that you are running echidna from the correct directory.

MadhanBlockMath commented 2 years ago

hi bro @elopez now getting error like this echidna-test: Couldn't compile given file stdout: stderr: Traceback (most recent call last): File "/home/ethsec/.local/bin/crytic-compile", line 11, in sys.exit(main()) File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/main.py", line 201, in main compilation.export(vars(args)) File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/crytic_compile.py", line 498, in export return PLATFORMS_EXPORT[export_format](self, kwargs) File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/platform/solc.py", line 117, in export_to_solc path = export_to_solc_from_compilation_unit(compilation_unit, "combined_solc", export_dir) File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/platform/solc.py", line 90, in export_to_solc_from_compilation_unit os.makedirs(export_dir) File "/usr/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: 'crytic-export'

elopez commented 2 years ago

It looks like you don't have write permissions on the folder you ran the tool from:

PermissionError: [Errno 13] Permission denied: 'crytic-export'

Make sure you can write there, or if you cannot change the permissions for some reason, copy your files to a place where you can (eg somewhere in /home/ethsec) and run the tool there.