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

refactor(lean-imt): move from hardhat to forge #23

Closed
wants to merge 14 commits into from
Closed

Conversation

sripwoud
Copy link
Member

@sripwoud sripwoud commented Jul 3, 2024

Towards #11
Closes #30

This PR replaces hardhat by forge in lean-imt as solidity development framework:

  • it keeps all the forge defaults (foudry.toml only specifies a remapping)
  • until dx: use soldeer for solidity dependencies #25 is solved, solidity deps becomes git submodules (a bit worse dx imo)
  • lean-imt tests are rewritten in solidity
  • slither ci check now only covers lean-imt

Note: sorry for the ugly commits history, I messed a rebase

@sripwoud sripwoud force-pushed the feat/forge branch 4 times, most recently from e452eb4 to 21e444b Compare July 3, 2024 15:21
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@@ -134,51 +152,30 @@ jobs:
echo "matrix=$matrix" >> $GITHUB_OUTPUT

slither:
if: needs.changed-files.outputs.any_changed == 'true'
needs: [changed-files, set-matrix, deps]
if: contains(needs.changed-files.outputs.modified_files, 'lean-imt')
Copy link
Member Author

@sripwoud sripwoud Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somehow slither was buggy when the monorepo combines contracts that are compiled with either hardhat or forge. As slither in the ci is new, and because eventually we'll have only forge, I suggest restricting the ci check to the forge pkgs as a temp fix.

"test:report-gas": "REPORT_GAS=true hardhat test",
"test:coverage": "hardhat coverage",
"typechain": "hardhat typechain",
"test:coverage": "forge coverage",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that the current latest version of forge does not allow excluding the t.sol files from coverage.
This was fixed very recently foundry-rs/foundry#2988

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coverage is not 100%
especially I am not covering the WrongSiblingNodes revert: I could not figure out how to write a corresponding test 😅

@sripwoud sripwoud self-assigned this Jul 3, 2024
@sripwoud sripwoud added tests 🧪 Adding missing or correcting existing tests dx 🔧 Developer experience devops 🔧 Operations management and dev tools labels Jul 3, 2024
@sripwoud sripwoud marked this pull request as ready for review July 3, 2024 20:55
@sripwoud sripwoud marked this pull request as draft July 3, 2024 21:23
@sripwoud sripwoud closed this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops 🔧 Operations management and dev tools dx 🔧 Developer experience tests 🧪 Adding missing or correcting existing tests
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

dx(lean-imt): migrate to forge
1 participant