The transferOwnership
function in the Ownable
contract allows the current owner to transfer ownership of the contract to a new address. It includes checks to ensure that the caller is the current owner and that the new owner's address is valid (not zero).
newOwner
(address
): The address of the new owner to whom ownership of the contract will be transferred.