-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Use a customizable _execute function in TimelockController #3317
Conversation
Hello @Joeysantoro Overriding the _execute function is possible in the governor, so your change would not only make sense, but improve consistency. The way you propose we change it is safe in your case, but I'm worried some override might forget the event. I'm going to refactor this PR a bit. |
If these changes follow your idea, I think we can go ahead and add a changelog before we can merge |
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.
This makes sense to me.
The tests are failing but I'm not sure why. @Amxx Can you check?
Tests are failing because Addresses.verifyCallResult will bubble up errors by default which is a different behavior to always returning the TimelockController error. Changing it back to |
I already fixed part of the tests. I'll have a second pass |
I edited this to use the old require logic instead so tests won't be broken. @frangio assuming the tests pass I think this can merge? The Addresses.verifyCallResult could be fixed in another 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.
Agree to merge.
Fixes #N/A
Set the
_call
method of the TimelockController to internal virtual so it can be overridden.For context, I am looking to write a TimelockController which exclusively executes through a Gnosis Safe as a module https://github.com/gnosis/safe-contracts/blob/main/contracts/base/ModuleManager.sol#L61-L73
So the "call" would get overridden to:
PR Checklist