I'm new to programming languages and trying to dive into solidity smart contracts, but does this mean that this contract could be taken over by anyone calling it due to it being public?
Sorry if this is a bad question
contract Ownable {
address public owner;
/**
@dev The Ownable constructor sets the original `owner` of the contract to the sender
account.
/
constructor() public {
owner = msg.sender;
}
/**
@dev Throws if called by any account other than the owner.
/
modifier onlyOwner() {
require(msg.sender == owner, "Ownable: caller is not the owner");
_;
}
/*
* @dev Allows the current owner to transfer control of the contract to a newOwner.
@param newOwner The address to transfer ownership to.
/
function transferOwnership(address newOwner) external onlyOwner {
if (newOwner != address(0)) {
owner = newOwner;