crytic / etheno

Simplify Ethereum security analysis and testing
GNU Affero General Public License v3.0
330 stars 31 forks source link

Etheno cannot activate Ganache-cli #94

Closed BarrySauce closed 2 years ago

BarrySauce commented 2 years ago

May I know the suitable node version for using Etheno together with Ganache cli? According to the description in Etheno reame.md, I set the node version to node v.12.22.11. And I install ganache-cli to this node. However when I input the command "etheno --ganache" in the terminal, there would always be error as shown in the screenshot below:

Screenshot 2022-04-11 at 10 17 50 AM

I tried different version of Ganache-cli, but the same error keeps occurring. May I know what the problem is?

P.S. When I activate the Ganache-cli in node 12 by running "ganache-cli", there would also be error. So I also tried node v.16.14.0, the Ganache-cli can be activated, but when using together with Etheno, the same error occurs.

ggrieco-tob commented 2 years ago

You need to have ganache-cli working, otherwise etheno will fail. Which error you have when running the command directly?

BarrySauce commented 2 years ago

@ggrieco-tob Hi sir, when I directly run the 'ganache-cli' command in my terminal under node 12, there would be error occurring as below:

Screenshot 2022-04-13 at 3 08 49 PM Screenshot 2022-04-13 at 3 09 16 PM
ggrieco-tob commented 2 years ago

Uhm, interesting. Can you please open an issue showing that error in the ganache repository: https://github.com/trufflesuite/ganache/issues ?

BarrySauce commented 2 years ago

@ggrieco-tob Yes sir, I created a discussion post on ganache repo, you can refer to this link: https://github.com/trufflesuite/ganache/discussions/2875 I will switch to node 12.0.0 and try it again 👍

BarrySauce commented 2 years ago

@ggrieco-tob Hi sir, I switch to node 12.0.0 and install ganache-cli. Now the ganache-cli can operate properly when I directly activate it. But when I use Etheno, the same error occurs:

Screenshot 2022-04-13 at 5 37 40 PM

So currently it seems there are some problems with Etheno. By the way, after I install Etheno, when I type 'Etheno' in the terminal, it shows 'command not found', I searched on the internet and found the solution is to enter the two commands below: $ echo "export PATH=\"python3 -m site --user-base/bin:\$PATH\"" >> ~/.bashrc $ source ~/.bashrc After typing these two command, I can activate Etheno, but still it cannot work with Ganache-cli properly.

Currently the two possible reasons I can think of are:

  1. The Ganache-cli I use currently is the newest version v7.0.4, Etheno may not be compatible with this new version.
  2. I am currently use python3 version v3.7.8, the pip verison I use is 22.0.4, Etheno may not be compatible with this python 3 version.

I think the first reason might be more possible, maybe I can try installing older version of ganache (for instance, the version developed 2 years ago).

BarrySauce commented 2 years ago

I tried Ganache-cli in my node 16, and used it with Etheno together, it can work properly now