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

feat: foundry refactor #313

Draft
wants to merge 44 commits into
base: develop
Choose a base branch
from
Draft

feat: foundry refactor #313

wants to merge 44 commits into from

Conversation

JDawg287
Copy link

Description

This PR is a grand effort to shift from the current Hardhat framework as a development toolchain to the Foundry toolchain.

Fixes # SMAR-68

Changes/Additions

  • Since the main focus for the foreseeable future are the v2 contracts:
    • Moved the contracts inside ./contracts/v2 to the ./contracts dir
    • Moved rest of the v1 contracts and the not so used contracts to ./contracts/outdated dir
  • There are a couple of contracts which are difficult to compile while running the forge coverage command (even with the --ir-minimum flag enabled). They are temporarily removed from the forge build flow by adding a .ignored extension at the end of the file names. For example PolygonZkEVMBridgeV2.sol.ignored. The originals can be found in the ./contracts-ignored-originals dir. For the Hardhat compilation an additional compile task is added which overrides the original compile task and renames the "ignored" files to their original name before compiling them and then changing the names back to being ignored. The task can be found in ./tasks/compile.ts dir.
  • Added Foundry tests equivalent of the already existing Hardhat tests for the important contracts in the test dir
    • Some tests still utilize the js libraries to generate Merkle proofs so a wrapper is added to expose the lib at tools/zkevm-commonjs-wrapper.js
  • The tests also utilize some auto generated deployers generated via the deployer-kit plugin
  • Added scripts:
    • script/DeployContracts.s.sol - to deploy all the entire stack in one go
    • script/GrantRole.sol - grant roles for the PolygonRollupManager contract via the PolygonZkEVMTimelock schedules

@cla-bot cla-bot bot added the cla-signed label Aug 21, 2024
@JDawg287 JDawg287 changed the base branch from main to develop August 21, 2024 23:29
Copy link

cla-bot bot commented Sep 12, 2024

We require contributors/corporates @ethyla, @JDawg287 to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

Copy link

cla-bot bot commented Sep 12, 2024

We require contributors/corporates @ethyla, @JDawg287 to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

2 similar comments
Copy link

cla-bot bot commented Sep 13, 2024

We require contributors/corporates @ethyla, @JDawg287 to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

Copy link

cla-bot bot commented Sep 13, 2024

We require contributors/corporates @ethyla, @JDawg287 to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

Copy link

cla-bot bot commented Sep 13, 2024

We require contributors/corporates @ethyla, @JDawg287 to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

1 similar comment
Copy link

cla-bot bot commented Sep 13, 2024

We require contributors/corporates @ethyla, @JDawg287 to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

JDawg287 and others added 25 commits September 20, 2024 11:58
Signed-off-by: JDawg287 <[email protected]>
Signed-off-by: JDawg287 <[email protected]>
Signed-off-by: JDawg287 <[email protected]>
Copy link

cla-bot bot commented Sep 20, 2024

We require contributors/corporates @ethyla, @JDawg287 to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

Copy link

cla-bot bot commented Sep 20, 2024

We require contributors/corporates @ethyla, @JDawg287 to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

Copy link

sonarcloud bot commented Sep 20, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants