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

Added ScopeLift foundry default settings to repo #14

Merged
merged 7 commits into from
Oct 1, 2024

Conversation

jferas
Copy link
Collaborator

@jferas jferas commented Sep 25, 2024

Resolves #1

This PR aadds the default Foundry/Forge configuration used by ScopeLift to the repo, which will be used for the development of the new CompoundGovernor. This configuration will co-exist with the hardhat environment used for developing the earlier GovernorBravo contracts. To achieve this coexistence, the node library hardhat-foundry is installed by this PR, as described here.

To minimize style/formatting differences, the previously existing contract source files have been added to the "ignore" section of the formatter section of the foundry.toml file.

Additionally, an empty CompoundGovernor.sol and CompoundGovernor.t.sol file have been added to the repo, in the contracts, and contracts/test directories respectively, to satisfy execution of the forge build and test commands.

@jferas jferas force-pushed the install-foundry branch 2 times, most recently from e532662 to 650aaad Compare September 25, 2024 15:37
Copy link

Coverage after merging install-foundry into main will be

0.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
contracts
   Comp.sol0%0%0%0%106, 116–118, 129–131, 133, 133–135, 137, 140–141, 149, 162–166, 166, 166–167, 167, 167–168, 168, 168–169, 178–179, 190, 190, 190, 192–193, 193–194, 198, 198–199, 203, 203–204, 207–212, 212, 212–214, 214, 214–215, 217, 220, 224–226, 228, 230, 234, 234, 234–235, 235, 235, 237–239, 241, 245, 245–246, 246–250, 253, 253–257, 263, 265, 265, 265–266, 268–269, 272, 276, 276, 276–277, 281, 281, 281–282, 286–287, 287, 287–288, 292, 292, 292–293, 297–299, 64–65, 75, 87–88, 88, 88–89, 91, 94, 96–97
   GovernorBravoDelegate.sol0%0%0%0%102–106, 125–126, 160, 160, 160–161, 163, 172–173, 176–177, 179–180, 183, 194, 197, 199, 199, 199, 204–205, 224, 224, 224, 229, 229, 229, 235, 235, 235, 241, 241, 241, 245, 245, 245, 250–251, 251–252, 255, 255, 255, 259, 259, 259, 265–266, 268–270, 272, 272, 272, 276–289, 291, 293, 304, 312, 312, 312, 316–319, 327–328, 338, 338, 338, 344, 352, 352, 352, 356–359, 367, 375, 375, 375, 380, 383, 383, 385, 385, 385–386, 386, 386, 392, 392, 392, 400–402, 411, 434–435, 448, 457, 457, 457, 461–462, 462, 462–464, 464, 464–466, 466, 466–471, 471–473, 473, 473–475, 475, 475–477, 477, 477–478, 480, 490, 510, 518, 521, 524–525, 525, 525, 529, 549, 575, 577, 585, 593, 596, 598, 598, 598, 602, 623, 623, 623, 627, 627, 627, 631–633, 633, 633, 637, 639, 639, 639–641, 641, 641–643, 643–644, 647–649, 651, 660, 668, 668, 668, 672, 672, 672, 677–678, 680, 688, 688, 688, 692, 692, 692, 697–698, 700, 709, 709, 709, 713, 713, 713, 718–719, 721, 73, 73, 73, 733, 733, 733, 737, 739, 747, 747, 747, 751–752, 754, 763, 763, 763–764, 764, 764, 768–769, 77, 77, 77, 770, 78, 78, 78, 780, 780, 780, 786, 789, 792, 801, 801, 801, 807–808, 811, 814, 816–817, 82, 82, 82, 821, 823, 825, 86, 86, 86, 91, 91, 91, 96, 96, 96
   GovernorBravoDelegator.sol0%0%0%0%20, 22, 34, 36, 44, 44, 44, 48, 48, 48, 53–54, 56, 66, 68, 68–69, 81, 84–85, 88–89, 91–92
   SafeMath.sol0%0%0%0%100, 115, 115–116, 119–121, 121, 121, 123, 138, 154, 154, 154–155, 158, 173, 188, 188, 188–189, 30–32, 32, 32, 34, 46–48, 48, 48, 50, 62, 74, 74, 74–75, 77, 92, 92–93, 96–98, 98, 98
   Timelock.sol0%0%0%0%100–101, 101, 101, 103, 105, 110, 28, 28, 28–29, 29, 29, 31–32, 38, 38, 38–39, 39, 39–40, 40, 40–41, 43, 47, 47, 47–49, 51, 55, 55, 55–56, 58, 62, 62, 62–63, 63, 63, 65–66, 68–69, 73, 73, 73, 75–76, 78, 82, 82, 82, 84–85, 85, 85–86, 86, 86–87, 87, 87, 89, 91, 93, 93, 93–94, 96
contracts/test
   GovernorAlpha.sol0%0%0%0%

Copy link
Collaborator

@wildmolasses wildmolasses left a comment

Choose a reason for hiding this comment

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

lgtm

single_line_statement_blocks = "multi"
tab_width = 4
wrap_comments = true
ignore = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

curious, why mark these as ignore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A number of the original contracts got modified by "forge fmt" and adding them to the ignore list allows them to not show up as large diffs on the PR.

@wildmolasses wildmolasses merged commit eb0704b into main Oct 1, 2024
3 checks passed
wildmolasses pushed a commit that referenced this pull request Nov 1, 2024
* Configured foundry/hardhat compatibility

* Add empty placeholder governor and test contract to verify forge install is working

* Added foundry.toml defaults for testing and formatting (original contracts not formatted)

* Add forge install to test.yml

* Updated hardhat plugin to latest to resolve coverage issue

* Switched proposer address in fork tests to one with some voting power

* prettier fix .. need for this triggered by previous commit ts file change
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.

Add Scopelift default foundry settings to repo
2 participants