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