-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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 GovernorCompatibilyBravo and add simpler GovernorStorage #4360
Conversation
🦋 Changeset detectedLatest commit: 1853702 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to remove the bravo module mentions from Governor
, IGovernor
, GovernorCountingSimple
, and governance.adoc
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
I did an overall refactor of the public and internal functions Types of functions
Rational
Also:
WDYT @frangio @ernestognw |
As discussed.
Fixes LIB-946
Fixes LIB-944
On of the challenge is that in order to provide the
queue(uint256)
endpoint, I needed to hook into thequeue(address[], uint256[], bytes[], bytes32)
function, which is defined in IGovernorTimelock and not in IGovernor.I did not move the propotype declaration, because that would mess up the interfaceId, and I just implemented a base version of the function (that just reverts for now) in Governor. This requires some new overrides. Moving the interface declaration would possibly reduce the need for override, but it would also either break the interfaceIds or require a lot of "xor tricks".
No tests yet, will do them if we agree on the solidity part.
Also
queue
/_queue
andcancel
/_cancel
, following theexecute
/_execute
pattern_validateStateBitmap
function to avoid code duplication when checking the current state.To discuss
Need for overrides would be improved if we moved the public declaration of the
queue
function fromIGovernorTimelock
toIGovernor
. This was not (yet) implemented because of the ERC-165 consequences. However, this comment makes me think that the ERC165 will likely change anyway, and that we are ok with that. So maybe we should also do that change.PR Checklist
npx changeset add
)