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] Allow non msg-sender ownable to initialize contract as Owner #3049

Closed
iainnash opened this issue Dec 23, 2021 · 2 comments
Closed

Comments

@iainnash
Copy link

🧐 Motivation
Recently, I've been using Ownable and OwnableUpgradeable to set ownership of contracts other than the deployer.

The pattern used is something like:

constructor(address newOwner) {
  transferOwnership(newOwner);
}

Which emits to transferOwnership events.

Especially for upgradable contracts this is useful.

📝 Details

Add in a new constructor argument to the upgradeable contracts that allows a different initial owner to be set.

@Amxx
Copy link
Collaborator

Amxx commented Dec 23, 2021

Hello @iainnash

This has already been discussed in
#2402
#2639
#2647

@Amxx Amxx closed this as completed Dec 23, 2021
@iainnash
Copy link
Author

Whoops @Amxx my bad, i was thinking of posting on contracts-upgradeable since the function overloading issue doesn't exist with that fork and this is a more common issue. However, i'm not sure if that works with the idea that the fork needs to be 100% compat with this core version.

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

No branches or pull requests

2 participants