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

SC: Solidity code testing and debug #9

Open
TheCrowbill opened this issue May 7, 2023 · 5 comments
Open

SC: Solidity code testing and debug #9

TheCrowbill opened this issue May 7, 2023 · 5 comments
Labels
DevOps Coding knowledge req'd

Comments

@TheCrowbill
Copy link
Member

HardHat test suite for FundItETC Solidity should:

Deployment

  • test for proper deployment of all contracts
  • test for the proper initialized state of all contracts

Functions

  • test for proper call and execution of all functions in all contracts
  • test fallback functions in all contracts

Error handling

  • test for proper handling of unexpected, incorrectly formatted, and missing params
  • test handling of params and args out of data bounds

Security

  • test for multiple initializer calls
  • test for function calls from EOA
  • test for reentrancy hardness
  • test for unexpected contract data insertions
  • test for contract takeover exploits
@raghavgithub06
Copy link

Heyy Do I have to test all the contracts that are present in web3 folder with security measures that you have mentioned?

@TheCrowbill
Copy link
Member Author

Heyy Do I have to test all the contracts that are present in web3 folder with security measures that you have mentioned?

Hello @raghavgithub06.

No, only the web3/contracts/fundit folder has custom contracts. Thanks for checking it out.

Compile with npx hardhat compile and test with npx hardhat test. Testing scripts should be kept in the test folder.

Thanks for helping out. Any other questions, just ask.

@raghavgithub06
Copy link

okayy cool!!

@raghavgithub06
Copy link

Heyy @TheCrowbill
I am not able to find the folders and files on my code editor after cloning the repo, please see the attachment that I have pinned and assist me, thank you.
Screenshot 2023-05-09 192348

@TheCrowbill
Copy link
Member Author

For working in VSCode on a local drive, I clone the repo to GitHub Desktop which prompts for a local storage path.

From GitHub Desktop, Ctrl + Shift - A will open the current repo's root directory in your editor.

@TheCrowbill TheCrowbill added the DevOps Coding knowledge req'd label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps Coding knowledge req'd
Projects
Status: On Hold
Development

No branches or pull requests

2 participants