-
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 ERC721Holder & ERC1155Holder in the TimelockController #4284
Use ERC721Holder & ERC1155Holder in the TimelockController #4284
Conversation
|
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request |
contracts/governance/Governor.sol
Outdated
@@ -25,7 +25,7 @@ import "./IGovernor.sol"; | |||
* | |||
* _Available since v4.3._ | |||
*/ | |||
abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receiver, IERC1155Receiver { | |||
abstract contract Governor is Context, ERC165, EIP712, IGovernor, ERC721Holder, ERC1155Holder { |
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.
What is our convention for ordering of interfaces within inheritance lists? I would like to include this in the guidelines doc.
I would always put interfaces first but I think you always put them last. In this case there is an added weirdness though because IGovernor
is an abstract contract.
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.
My main goal was to have the inheritance ordering tests pass. I first I wanted to reorder some things, and I spent ~2h down the rabit hole of fixing ordering when the solution was staring at me from the start.
Co-authored-by: Francisco <[email protected]>
Wow, I've been trying for a while to get the inheritance ordering to be consistent and I can't get it to work. |
Yes, I sent over 2h on that too. We need a good guideline (IMO interfaces should come before implementations) EDIT: my proposal (before your changes) was OK on my machine. I'm not sure why its failing here. |
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.
I don't see a major issue with this, but I see there's a conversation around the inheritance order, can you explain me real quick why is the inheritance an issue here?
Consider this an LGTM if you sort it out.
I'm starting to doubt the value of this PR if the hooks are overridden by #4314 anyway. |
Right, the timelock part (that is not actually difficult) makes sens. The governor part (which is the one we struggle with) not so much. Should we only keep the timelock part of this PR and merge it? |
This sounds 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.
LGTM. Storage layout check is failing but this is expected.
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.
LGTM, thanks @Amxx!
The base branch was changed.
This PR was still targeting next-v5.0. I had to retarget and resolve conflicts, which dismissed the reviews :/ |
Fixes #3936
Fixes LIB-838
PR Checklist
npx changeset add
)