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

Minor governance module improvements plus adding veryfing_contract to Delegation #1214

Merged

Conversation

ericnordelo
Copy link
Member

No description provided.

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.06%. Comparing base (f84b30d) to head (ec9d57c).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1214   +/-   ##
=======================================
  Coverage   92.06%   92.06%           
=======================================
  Files          49       49           
  Lines        1398     1399    +1     
=======================================
+ Hits         1287     1288    +1     
  Misses        111      111           
Files with missing lines Coverage Δ
packages/governance/src/multisig/multisig.cairo 96.47% <ø> (ø)
.../governance/src/timelock/timelock_controller.cairo 88.70% <ø> (ø)
packages/governance/src/votes/delegation.cairo 50.00% <ø> (ø)
packages/governance/src/votes/votes.cairo 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f84b30d...ec9d57c. Read the comment docs.

Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

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

Improvements look good! I left a few minor suggestions and a question

docs/modules/ROOT/pages/api/governance.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/api/governance.adoc Outdated Show resolved Hide resolved
packages/governance/src/timelock/timelock_controller.cairo Outdated Show resolved Hide resolved
packages/governance/src/votes.cairo Outdated Show resolved Hide resolved
packages/governance/src/timelock/timelock_controller.cairo Outdated Show resolved Hide resolved
Comment on lines +86 to +91
pub trait VotingUnitsTrait<TState> {
/// Returns the number of voting units for a given account. For ERC20, this is typically the
/// token balance. For ERC721, this is typically the number of tokens owned.
///
/// WARNING: While any formula can be used as a measure of voting units, the internal vote
/// accounting of the contract may be compromised if voting units are transferred in any
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is technically breaking since we're changing its path, no? I'd probably add it to the changelog since it's public. WDYT?

ericnordelo and others added 5 commits November 15, 2024 01:27
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Copy link
Collaborator

@immrsd immrsd left a comment

Choose a reason for hiding this comment

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

Agree with Andrew regarding mentioning in the changelog that VotingUnitsTrait has been moved. Apart from that, LGTM!

packages/governance/src/tests/test_votes.cairo Outdated Show resolved Hide resolved
ericnordelo and others added 2 commits November 15, 2024 15:57
Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>
@ericnordelo ericnordelo merged commit 1648af3 into OpenZeppelin:main Nov 15, 2024
6 checks passed
@ericnordelo ericnordelo deleted the feat/improve-governance-module branch November 15, 2024 15:08
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