Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INFO: CryticCompile: 'npx buidler compile' running #115

Closed
PaulRBerg opened this issue Oct 21, 2020 · 3 comments
Closed

INFO: CryticCompile: 'npx buidler compile' running #115

PaulRBerg opened this issue Oct 21, 2020 · 3 comments

Comments

@PaulRBerg
Copy link
Contributor

PaulRBerg commented Oct 21, 2020

Description

I ran the following steps:

  1. Install Echidna via Docker
  2. Add cryticArgs: ["--compile-force-framework", "buidler"] in my config.yml file
  3. Execute echidna-test ./contracts/invariants/FintrollerInvariants.sol --config ./contracts/invariants/config.yml

And received the error below.

Error

ethsec@dd7de7baf69b:/home/workspace$ echidna-test ./contracts/invariants/FintrollerInvariants.sol --config ./contracts/invariants/config.yml
echidna-test: Couldn't compile given file
stdout:
stderr:
INFO:CryticCompile:'npx buidler compile' running
Traceback (most recent call last):
  File "/home/ethsec/.local/bin/crytic-compile", line 33, in <module>
    sys.exit(load_entry_point('crytic-compile==0.1.9', 'console_scripts', 'crytic-compile')())
  File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/__main__.py", line 157, in main
    compilations = compile_all(**vars(args))
  File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/crytic_compile.py", line 1019, in compile_all
    compilations.append(CryticCompile(target, **kwargs))
  File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/crytic_compile.py", line 123, in __init__
    self._compile(**kwargs)
  File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/crytic_compile.py", line 930, in _compile
    self._platform.compile(self, **kwargs)
  File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/platform/buidler.py", line 66, in compile
    cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=self._target
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: './contracts/invariants/FintrollerInvariants.sol'

Environment

  • node@v12.16.3
  • yarn@1.22.10
  • npm@6.14.4
  • echidna@1.5.1
  • buidler@1.4.7
@PaulRBerg
Copy link
Contributor Author

It looks like a bug to me. I changed the command to:

echidna-test . --contract FintrollerInvariants --config contracts/invariants/config.yml

And now I'm getting this error:

echidna-test: Couldn't compile given file
stdout:
stderr:
INFO:CryticCompile:'npx buidler compile' running
INFO:CryticCompile:Compiling...
Downloading compiler version 0.7.4
Compiled 41 contracts successfully

ERROR:CryticCompile:Unknown file: ontracts/BalanceSheet.sol

Is it because I'm using solidity 0.7.4, while the eth-security-toolbox only accepts up to 0.7.2?

@PaulRBerg
Copy link
Contributor Author

PaulRBerg commented Oct 21, 2020

Nah, it's not about the compiler version. I downgraded to 0.7.2 and the above errors persists.

@PaulRBerg
Copy link
Contributor Author

Closing in favour of #116.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant