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

Migration from Truffle to Hardhat/Foundry - #501

Merged
simonDos merged 9 commits into
stagefrom
migration
Feb 5, 2024
Merged

simonDos merged 9 commits into
stagefrom
migration

Conversation

@simonDos

Copy link
Copy Markdown
Contributor

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
@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.

1 participant