Skip to content
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

ownable: add a notice on renounceOwnership #937

Merged

Conversation

come-maiz
Copy link
Contributor

πŸš€ Description

I added a notice to warn users calling renounceOwnership.

  • πŸ“˜ I've reviewed the OpenZeppelin Contributor Guidelines
  • βœ… I've added tests where applicable to test my new functionality.
  • πŸ“– I've made sure that my contracts are well-documented.
  • 🎨 I've run the JS/Solidity linters and fixed any issues (npm run lint:all:fix).

@k06a
Copy link
Contributor

k06a commented May 10, 2018

Maybe replace this line:

owner = address(0);

With this one:

delete owner;

To make things more clear

@come-maiz
Copy link
Contributor Author

Thanks for the comment @k06a. That is not related to this PR though. Why don't you make the change and propose it in a separate PR, so we can discuss in there?

@come-maiz come-maiz force-pushed the feature/renounce-ownership-notice branch from b299695 to cc4586a Compare May 30, 2018 06:51
@@ -42,6 +42,9 @@ contract Ownable {

/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call anymore the functions with the onlyOwner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: the english would flow better like:

"It will not be possible to call the functions with the onlyOwner modifier anymore."

@come-maiz
Copy link
Contributor Author

Updated. Thanks for the review @shrugs !

Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to take extra measures to make renounceOwnership hard to call?

We can do something like add an argument to it that the user must explicitly pass. Perhaps the address of the contract itself.

@frangio frangio merged commit 72792a7 into OpenZeppelin:master Jun 10, 2018
@come-maiz come-maiz deleted the feature/renounce-ownership-notice branch June 12, 2018 06:56
@come-maiz
Copy link
Contributor Author

I like that idea @frangio, like on github where you have to confirm that you want to delete a repo by entering the repo name. Report an issue to explore it further?

@frangio
Copy link
Contributor

frangio commented Jun 12, 2018

Opened #1000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants