Skip to content

[Ownable] Allow non msg-sender ownable to initialize contract as Owner #3049

Closed
@iainnash

Description

@iainnash

🧐 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions