Code Monkey home page Code Monkey logo

Comments (10)

ggrieco-tob avatar ggrieco-tob commented on September 23, 2024

I'm checking this issue today, sorry for the delay

from building-secure-contracts.

ggrieco-tob avatar ggrieco-tob commented on September 23, 2024

This works fine here. Your json file looks correct to me however, can you please try using the suggested echidna file?

prefix: crytic_
initialize: init.json
multi-abi: true
cryticArgs: ['--truffle-build-directory', 'app/src/contracts/'] # needed by drizzle

Also please update to the latest Echidna release (2.0.1). I will still improve the tutorial with a few minor changes, so please take a look later just in case.

from building-secure-contracts.

BarrySauce avatar BarrySauce commented on September 23, 2024

This works fine here. Your json file looks correct to me however, can you please try using the suggested echidna file?

prefix: crytic_
initialize: init.json
multi-abi: true
cryticArgs: ['--truffle-build-directory', 'app/src/contracts/'] # needed by drizzle

Also please update to the latest Echidna release (2.0.1). I will still improve the tutorial with a few minor changes, so please take a look later just in case.

@ggrieco-tob Sure, let me give it a try. Actually I am also referring to this post https://github.com/crytic/echidna/wiki/How-to-use-Echidna-with-multiple-contracts, Echidna can output correct result using the proxy method. The proxy contract I write is as follow:
Screenshot 2022-05-09 at 3 38 27 PM

from building-secure-contracts.

BarrySauce avatar BarrySauce commented on September 23, 2024

This works fine here. Your json file looks correct to me however, can you please try using the suggested echidna file?

prefix: crytic_
initialize: init.json
multi-abi: true
cryticArgs: ['--truffle-build-directory', 'app/src/contracts/'] # needed by drizzle

Also please update to the latest Echidna release (2.0.1). I will still improve the tutorial with a few minor changes, so please take a look later just in case.

@ggrieco-tob And may I know what the 'cryticArgs' means in the config file, I enter the app/src/contracts directory and find out there are only json files of the compiled contracts.

from building-secure-contracts.

ggrieco-tob avatar ggrieco-tob commented on September 23, 2024

And may I know what the 'cryticArgs' means in the config file, I enter the app/src/contracts directory and find out there are only json files of the compiled contracts.

cryticArgs are a list of additional arguments to use in crytic-compile for the compilation of the contract to test. An up-to-date list of the echidna config options is available here: https://github.com/crytic/echidna/wiki/Config

from building-secure-contracts.

BarrySauce avatar BarrySauce commented on September 23, 2024

@ggrieco-tob Thank you sir. Previously I am using 2.0.0, now I am switching to 2.0.1 to give it a try. I am using the binary version, so the drizzle -box folder is put inside the echidna folder containing the binary programs.
But the result is still the same, echidna does not find the error. My directory is as follows:

Screenshot 2022-05-09 at 5 00 51 PM

The E2E.sol is put in the drizzle-box/contracts/crytic directory
Screenshot 2022-05-09 at 5 01 50 PM

And I view the app/src directory, there's no contracts folder being generated:
Screenshot 2022-05-09 at 5 03 41 PM

My command to run the echidna test is:
$ ./echidna-test drizzle-box/contracts/crytic/E2E.sol --contract E2E --config echidna.yaml

Do you think the cause could be the mismatch of contract directories or config file directory?

from building-secure-contracts.

ggrieco-tob avatar ggrieco-tob commented on September 23, 2024

@elopez can you take a look and try to reproduce this issue in MacOS? (which seems to be used here).

from building-secure-contracts.

elopez avatar elopez commented on September 23, 2024

Following the process as of this version of the document worked okay on my Mac, with a few caveats:

  • I had to npm i ganache-cli@6, otherwise etheno would not play nice with ganache-cli v7.x
  • I had to install etheno this way, otherwise I would end up with broken dependencies that would not let me run it:
python3 -m venv venv
venv/bin/pip3 install https://github.com/crytic/etheno/archive/refs/heads/master.zip 'eth-rlp<0.3.0'

@BarrySauce note that you're passing the .sol directly to echidna on your call -- you need to pass the project folder instead and let truffle handle the build of the E2E and other contracts. Give ./echidna-test drizzle-box/ --contract E2E --config echidna.yaml a try and let us know if that helps!

from building-secure-contracts.

BarrySauce avatar BarrySauce commented on September 23, 2024

Following the process as of this version of the document worked okay on my Mac, with a few caveats:

  • I had to npm i ganache-cli@6, otherwise etheno would not play nice with ganache-cli v7.x
  • I had to install etheno this way, otherwise I would end up with broken dependencies that would not let me run it:
python3 -m venv venv
venv/bin/pip3 install https://github.com/crytic/etheno/archive/refs/heads/master.zip 'eth-rlp<0.3.0'

@BarrySauce note that you're passing the .sol directly to echidna on your call -- you need to pass the project folder instead and let truffle handle the build of the E2E and other contracts. Give ./echidna-test drizzle-box/ --contract E2E --config echidna.yaml a try and let us know if that helps!

@elopez I tried your command and it works! Thank you for your help, and thank @ggrieco-tob for your support. So in case of this kind of test using with Etheno, we cannot pass the specific E2E .sol file, instead we are supposed to pass the project folder and the contract 👍

from building-secure-contracts.

ggrieco-tob avatar ggrieco-tob commented on September 23, 2024

Thanks for opening the issue and help us to improve our documentation. I added a clarification in the tutorial to avoid this issue in the future: 82bdc69

from building-secure-contracts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.