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

Add to Ownable a function to renounce ownership #903

Closed
frangio opened this issue Apr 20, 2018 · 3 comments · Fixed by #907
Closed

Add to Ownable a function to renounce ownership #903

frangio opened this issue Apr 20, 2018 · 3 comments · Fixed by #907
Labels
feature New contracts, functions, or helpers. good first issue Low hanging fruit for new contributors to get involved!

Comments

@frangio
Copy link
Contributor

frangio commented Apr 20, 2018

I think we should have a function in Ownable to set the owner state variable to 0, since this can't be done by using transferOwnership.

Not sure about the name, but I was thinking renounceOwnership.

@frangio frangio added feature New contracts, functions, or helpers. good first issue Low hanging fruit for new contributors to get involved! labels Apr 20, 2018
@OTTTO
Copy link

OTTTO commented Apr 21, 2018

Seems superfluous.
Owner can just call the function and set the new owner to 0x0..., any listeners would than receive this information from the event. And anyone who wants to verify for themselves can simply check the public owner variable.

@frangio
Copy link
Contributor Author

frangio commented Apr 21, 2018

@OTTTO, in fact transferOwnership cannot be used to set the owner to 0x0 since a while ago. Hence this issue.

https://github.com/OpenZeppelin/zeppelin-solidity/blob/77cc33fc5c4d0b0d03aec1d8bba77edc9a7196ae/contracts/ownership/Ownable.sol#L37

@stefek99
Copy link
Contributor

I saw the updated code and I agree with @OTTTO that it seems superfluous - had to Google that word.

image

There is require(newOwner != address(0)); preventing from accidental disasters, alternative approach would be to use so magic value 0x00000000001 here, so the renounce makes more sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New contracts, functions, or helpers. good first issue Low hanging fruit for new contributors to get involved!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants