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

POL updates, migration to Foundry/Hardhat #502

Merged
merged 22 commits into from
Feb 14, 2024
Merged

POL updates, migration to Foundry/Hardhat #502

merged 22 commits into from
Feb 14, 2024

Conversation

simonDos
Copy link
Member

@simonDos simonDos commented Feb 7, 2024

This merge includes 3 different major changes:

  1. POL-related SC updates from plasma-bridge-update branch (reviewed and audited)
  2. Migration of the whole repository and all tests to use Foundry/Hardhat (description below)
  3. Deletion of deprecated/unused contracts (which are not on mainnet)

Migration details
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.

@maticnetwork maticnetwork deleted a comment from gitguardian bot Feb 7, 2024
@simonDos simonDos marked this pull request as draft February 7, 2024 16:23
@maticnetwork maticnetwork deleted a comment from gitguardian bot Feb 8, 2024
@simonDos simonDos marked this pull request as ready for review February 8, 2024 18:18
@simonDos simonDos merged commit 50a2dc0 into main Feb 14, 2024
3 checks passed
@simonDos simonDos deleted the stage branch February 14, 2024 07:31
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.

2 participants