Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Migration from Truffle to Hardhat/Foundry #501

Merged
merged 9 commits into from
Feb 5, 2024
Merged

Migration from Truffle to Hardhat/Foundry #501

merged 9 commits into from
Feb 5, 2024

Conversation

simonDos
Copy link
Member

We used the new Foundry template repo as a starting point, but incorporated Hardhat to easily re-use the old tests.
All test were then migrated to be used with new JS version and Hardhat framework

No Smart Contract was edited during this migration!!!

Goals:

  • compiles with forge build
  • compiles with hardhat compile
  • all tests run with hardhat
  • solidity coverage works
  • README updated

type: module

As the old tests relied heavily on import statements, we decided to make the whole project "type": "module" .

This results in the necessary renaming of some config files like hardhat.config.cjs or solcover.cjs using the cjs extension.

Config

To maintain a single source of truth for our config, we import foundry.toml into hardhat.config.cjs to define solidity version and optimiser runs.

@simonDos simonDos force-pushed the migration branch 2 times, most recently from 5f573d6 to fd8344f Compare February 1, 2024 00:03
@simonDos simonDos closed this Feb 5, 2024
@simonDos simonDos reopened this Feb 5, 2024
@maticnetwork maticnetwork deleted a comment from gitguardian bot Feb 5, 2024
@simonDos simonDos merged commit 83d36cb into stage Feb 5, 2024
4 checks passed
@simonDos simonDos deleted the migration branch February 5, 2024 11:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant