-
Notifications
You must be signed in to change notification settings - Fork 183
Remove redundant overrides in Governor #522
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
Remove redundant overrides in Governor #522
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
1d9adb9 to
5ba4ade
Compare
5ba4ade to
84a66b9
Compare
|
I confirm that I have read and hereby agree to the OpenZeppelin Contributor License Agreement |
|
Hi @HananeBendisari , thanks for your PR |
|
Oh sorry about that. Thanks for the update. I’m finishing the checks on delegation + votes in Remix, I’ll push a new commit soon. |
|
Thanks for the heads-up @CoveMB ! Confirmed everything again step-by-step:
Tested with the following setup:
Let me know if you'd like me to include a safeguard or conditional override fallback. Otherwise, I think this patch is good to go |
|
@HananeBendisari Would you be able to remove all of the changes from this PR except for Additionally, can you please also add an entry to the Unreleased section of |
baf0af1 to
84a66b9
Compare
|
All set! This PR now only includes the necessary Governor override for quorum() in absolute mode, restored at the correct location inside addQuorum(). No other files are touched. Thanks for your feedback earlier — let me know if anything else is needed! |
|
I've updated the PR description and removed some additional function overrides for votingDelay and votingPeriod. We'll review this further before proceeding to merge. Thanks! |
|
Hey @ericglau , I realize now that my original fix only addressed a small part of a broader cleanup you had in mind regarding redundant overrides. Sorry if my limited scope caused extra noise or delay on your side. It’s been a great learning opportunity for me — I’ll be more careful next time to better understand the context before jumping in. Appreciate the thoughtful feedback throughout. |
This PR removes redundant overrides of
quorum(),votingDelay(), andvotingPeriod()functions in the Governor contract generator.Governor.solhas virtual functions which are not implemented, while extensions such asGovernorVotesQuorumFraction.solandGovernorSettings.solalready overrides these functions.Therefore, there is no need to override both
Governorand the extension when using these functions.Related discussion: openzeppelin/openzeppelin-contracts#3948
Fixes #218