// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract SafeContract { address public owner; modifier onlyOwner() { require(msg.sender == owner, "Not authorized"); _; } constructor() { owner = msg.sender; } function transferOwnership(address newOwner) public onlyOwner { owner = newOwner; } }