allow empty address to be owner

This commit is contained in:
mingda
2020-12-12 15:51:23 +08:00
parent 053c5257de
commit f5c44ec63c
2 changed files with 1 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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;
}