-
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 override
for functions from interfaces & further improvement suggestions (for v5.0
)
#4059
Comments
override
for functions from interfaces (for v5.0)override
for functions from interfaces (for v5.0
)
0.8.8 is totally acceptable. I would be willing to go to a very recent version if it gets us good language features. |
If this is the case, let me push that idea further - what about mapping(address owner => mapping(address spender => uint256 amount)) private _allowances; |
How about introducing type-safe bytecode encoding introduced in
Would propose changing this to
|
This is addressed in PR #4293 |
@frangio Any guidelines on how to proceed on this or is it been taken care internally? |
A PR is welcome. Our only concern is that for a review we need to know how to check that the change was done exhaustively. |
Should we also consider named parameters for mapping types? |
override
for functions from interfaces (for v5.0
)override
for functions from interfaces & further improvement suggestions (for v5.0
)
Since we extended the scope of this issue, I amended the title for clarity fyi. |
I removed every override and reinstated the ones needed to compile and those in comments. I'm quite sure it was exhaustively but more verificications are never enought |
#4059 (comment) @ernestognw @frangio is this somewhere tracked as a separate issue so we don't forget about? |
@pcaversaccio Feel free to open an issue. |
@pcaversaccio If I may suggest a format, a metaissue with a list of all the pattern updates and then an issue per item so it is easier to track and discuss |
I think that would make sense, however, that meta-issue should be managed by the OZ team imo. In any case, I opened an issue on the named parameters in mapping types here #4343. |
🧐 Motivation
All the base implementation contracts use currently the
override
modifiers since Solidity requires theoverride
keyword when implementing a function from a parent interface. @frangio once opened an issue here. A simple example:Since Solidity
0.8.8
a function that overrides only a single interface function does not require theoverride
modifier anymore. I wanted to quickly discuss what kind of Solidity version is planned forv5
contracts as well as such a refactoring would be plausible if upgraded to solc>=0.8.8
.The text was updated successfully, but these errors were encountered: