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
Add state getter in TimelockController using OperationState enum #4358
Add state getter in TimelockController using OperationState enum #4358
Conversation
🦋 Changeset detectedLatest commit: 8d43f44 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 |
To reiterate, what is missing in this PR is to add back |
# Conflicts: # contracts/governance/extensions/GovernorTimelockControl.sol
And what is de decision for the pending name? I suggest keep the pending meaning of 'operation scheduled but not done or canceled' because of the previous method 'isOperationPending'. And to create another name fot the state between scheduled but before the time alloed to execute like 'blocked' |
Pending should preserve the meaning implied by
I agree with this proposal, we can have |
|
Interesting. The issue is that cancel can be done in two states, and the |
I think what we did in More in favor if a bitmap anyway. |
ok with bitmap |
As of now I just copied the '_encodeStateBitmap' from 'Governor' to 'TimelockController' I would like to unify both implementation, maybe in a file in the utils folder in governance itself, but this woul affect too many files so I want to see yout take on that before doing it |
I don't think we can do this because it's a different enum type. |
I've renamed A few other minor changes as well. This LGTM just need someone else to approve. |
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.
Slight comment about the docs.
Code and Tests are good to me !
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're close, just want to confirm why are we removing the virtual
from the getters, but that was changed by @frangio
Let's make an issue for this, it needs discussion but my opinion is that the |
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
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.
Just checked back with @frangio on the virtual
topic and we agreed the way to override them is by overriding the state
getter, which is the source of truth. Also, other functions use the getters instead of state
so this is the way to guarantee they behave correctly.
Fixes #4316
Fixes LIB-899
TimelockController
remove:
isOperationPending
isOperationReady
isOperationDone
implement:
PR Checklist
npx changeset add
)