Make Ownable's initial owner explicit (#4267)

Co-authored-by: Ernesto García <ernestognw@gmail.com>
This commit is contained in:
Hadrien Croubois
2023-05-23 23:26:43 +02:00
committed by GitHub
parent 11d65442b3
commit 13d5e0466a
10 changed files with 29 additions and 20 deletions

View File

@ -21,10 +21,9 @@ contract UpgradeableBeacon is IBeacon, Ownable {
event Upgraded(address indexed implementation);
/**
* @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the
* beacon.
* @dev Sets the address of the initial implementation, and the initial owner who can upgrade the beacon.
*/
constructor(address implementation_) {
constructor(address implementation_, address initialOwner) Ownable(initialOwner) {
_setImplementation(implementation_);
}

View File

@ -11,6 +11,11 @@ import "../../access/Ownable.sol";
* explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.
*/
contract ProxyAdmin is Ownable {
/**
* @dev Sets the initial owner who can perform upgrades.
*/
constructor(address initialOwner) Ownable(initialOwner) {}
/**
* @dev Changes the admin of `proxy` to `newAdmin`.
*