0

I just attempted to audit smart contracts that were tested using the Hardhat framework. In Foundry, after cloning the repository, I know that I can install all the necessary dependencies by simply using the 'forge test' command. However, in Hardhat, I'm not sure how to install the dependencies. Can anyone please explain how I can do that?"

1 Answer 1

2

Just check if it used yarn or npm, then run either npm install or yarn install. After installing run the test command npx hardhat test ./test/TestFilePath.

7
  • yeah,I tried with npm install but the terminal throws the below errors and im using the node.js version of v18.15.0. npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: @venusprotocol/[email protected] npm ERR! Found: [email protected] npm ERR! node_modules/solidity-coverage npm ERR! dev solidity-coverage@"^0.8.4" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer solidity-coverage@"^0.7.21" from @nomicfoundation/[email protected]
    – kumar
    Oct 2, 2023 at 12:07
  • Below is the installation process provided in readme file ``` git clone github.com/code-423n4/2023-09-venus cd 2023-09-venus yarn install # or npm install ```
    – kumar
    Oct 2, 2023 at 12:09
  • what about yarn install? Oct 2, 2023 at 12:10
  • i haven't pre installed yarn in my laptop
    – kumar
    Oct 2, 2023 at 12:15
  • Then install it, it will work fine Oct 2, 2023 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.