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 GovernorSettableFixedQuorumUpgradeable #20

Merged
merged 9 commits into from
Oct 11, 2024

Conversation

jferas
Copy link
Collaborator

@jferas jferas commented Oct 8, 2024

Resolves #15

@jferas jferas marked this pull request as draft October 8, 2024 12:48
@jferas
Copy link
Collaborator Author

jferas commented Oct 8, 2024

Converted back to draft till we get the contract size small enough.. this is the cause of the CI failure

@coveralls
Copy link

coveralls commented Oct 8, 2024

Pull Request Test Coverage Report for Build 11295061138

Details

  • 0 of 12 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-3.1%) to 92.058%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/CompoundGovernor.sol 0 1 0.0%
contracts/extensions/GovernorSettableFixedQuorumUpgradeable.sol 0 11 0.0%
Totals Coverage Status
Change from base Build 11234958827: -3.1%
Covered Lines: 318
Relevant Lines: 346

💛 - Coveralls

@jferas jferas marked this pull request as ready for review October 8, 2024 13:14
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; pain we're already near contract size limit; we'll punt on that for now though.

@jferas jferas force-pushed the feat/settable-fixed-quorum branch from d086d70 to 1c9cb65 Compare October 9, 2024 19:35
Copy link
Member

@garyghayrat garyghayrat left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -24,7 +24,7 @@ contract CompoundGovernorTest is Test, CompoundGovernorConstants {
}

function testInitialize() public view {
assertEq(governor.quorumVotes(), INITIAL_QUORUM);
assertEq(governor.quorum(block.timestamp), INITIAL_QUORUM);
Copy link
Member

Choose a reason for hiding this comment

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

should be block.number?

Copy link
Collaborator Author

@jferas jferas Oct 11, 2024

Choose a reason for hiding this comment

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

Done: 701baf3

@jferas jferas force-pushed the feat/settable-fixed-quorum branch from 878d2b6 to a4334c8 Compare October 11, 2024 14:28
Notice and addition of "virtual" to functions where it was missing.

Co-authored-by: Ed Mazurek <[email protected]>
@wildmolasses wildmolasses merged commit 272dd4c into main Oct 11, 2024
3 checks passed
wildmolasses added a commit that referenced this pull request Nov 1, 2024
* Added GovernorSettableFixedQuorumUpgradeable

* Changed foundry.toml optimizer_runs to 200 to shrink code size

* Now using 'upperLookupRecent' for checkpointed quorum values

* Use 'clock()' instead of 'block.timestamp' when setting checkpointed quorum

* Also use clock() for setQuorum emit

* Consistent use of uint256 for quorum publicly, uint208 internally

* Removed superflous cast

* Fixed test to use clock for quorum checkpoint

* Apply suggestions from code review

Notice and addition of "virtual" to functions where it was missing.

Co-authored-by: Ed Mazurek <[email protected]>

---------

Co-authored-by: Ed Mazurek <[email protected]>
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 settable fixed quorum
4 participants