From f5c44ec63c36da12180e796efbfc8ba9fa95e1dc Mon Sep 17 00:00:00 2001 From: mingda Date: Sat, 12 Dec 2020 15:51:23 +0800 Subject: [PATCH] allow empty address to be owner --- contracts/lib/InitializableOwnable.sol | 3 +-- contracts/lib/Ownable.sol | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/contracts/lib/InitializableOwnable.sol b/contracts/lib/InitializableOwnable.sol index 7d70838..fa2d8a5 100644 --- a/contracts/lib/InitializableOwnable.sol +++ b/contracts/lib/InitializableOwnable.sol @@ -39,13 +39,12 @@ contract InitializableOwnable { // ============ Functions ============ - function initOwner(address newOwner) public notInitialized{ + function initOwner(address newOwner) public notInitialized { _INITIALIZED_ = true; _OWNER_ = newOwner; } function transferOwnership(address newOwner) public onlyOwner { - require(newOwner != address(0), "INVALID_OWNER"); emit OwnershipTransferPrepared(_OWNER_, newOwner); _NEW_OWNER_ = newOwner; } diff --git a/contracts/lib/Ownable.sol b/contracts/lib/Ownable.sol index 68dcacf..caefd0d 100644 --- a/contracts/lib/Ownable.sol +++ b/contracts/lib/Ownable.sol @@ -39,7 +39,6 @@ contract Ownable { } function transferOwnership(address newOwner) external onlyOwner { - require(newOwner != address(0), "INVALID_OWNER"); emit OwnershipTransferPrepared(_OWNER_, newOwner); _NEW_OWNER_ = newOwner; }