From bbf23ab30703297fe5a13f4171d53b0805250d7a Mon Sep 17 00:00:00 2001 From: Roman Roibu Date: Sat, 20 Jul 2024 12:42:47 +0200 Subject: [PATCH] Completely replace Ownable with OZ Ownable --- .../dnsregistrar/SimplePublicSuffixList.sol | 2 +- contracts/root/Ownable.sol | 28 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 contracts/root/Ownable.sol diff --git a/contracts/dnsregistrar/SimplePublicSuffixList.sol b/contracts/dnsregistrar/SimplePublicSuffixList.sol index 1d6b8aa57..c4e8f6b55 100644 --- a/contracts/dnsregistrar/SimplePublicSuffixList.sol +++ b/contracts/dnsregistrar/SimplePublicSuffixList.sol @@ -1,7 +1,7 @@ pragma solidity ^0.8.4; pragma experimental ABIEncoderV2; -import "../root/Ownable.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; import "./PublicSuffixList.sol"; contract SimplePublicSuffixList is PublicSuffixList, Ownable { diff --git a/contracts/root/Ownable.sol b/contracts/root/Ownable.sol deleted file mode 100644 index 7517097ee..000000000 --- a/contracts/root/Ownable.sol +++ /dev/null @@ -1,28 +0,0 @@ -pragma solidity ^0.8.4; - -contract Ownable { - address public owner; - - event OwnershipTransferred( - address indexed previousOwner, - address indexed newOwner - ); - - modifier onlyOwner() { - require(isOwner(msg.sender)); - _; - } - - constructor() public { - owner = msg.sender; - } - - function transferOwnership(address newOwner) public onlyOwner { - emit OwnershipTransferred(owner, newOwner); - owner = newOwner; - } - - function isOwner(address addr) public view returns (bool) { - return owner == addr; - } -}