-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Minor: declare the constructor of contract Ownable internal instead of public #1394
Comments
We may need to better define what a feature request and an improvement are :) I think this makes a lot of sense, and I like the idea of guiding users into the usage we intend. This same thing applies to some other contracts, such as |
@nventuro: P.S.: I wouldn't call it a breaking change, since doubtfully anyone has ever deployed a standalone instance of |
Technically it's a breaking change of the API, though a minor one 😛 We're currently in the process of reviewing the last minor changes, it is possible this will make it into 2.0, since the scope is so small. |
After thinking about this some more, it is definitely something we want to include in the release. Off the top of my head, the contracts that should have this sort of thing are:
Some of these have no constructor: maybe we should give them an empty |
@nventuro: I have mentioned only the |
|
🧐 Motivation
This doesn't really fall under the category of a feature-request, nor does it fall under the category of a bug-report. The motivation is to be a little more pedantic with the object-oriented implementation of
contract Ownable
. That said, it might have been proposed here before...📝 Details
It makes very little sense to deploy this contract as is, so its constructor can and should be declared
internal
instead ofpublic
. True, it would make testing it slightly harder, as you'd need to add a helper contract inheriting from it (you could probably name itOwnableProxy
orOwnableAdapter
).Nevertheless, it would emphasize to all users that this contract has no purpose other than being part of an extended contract.
The text was updated successfully, but these errors were encountered: