Hi there,
I am trying to ascertain whether my contract has actually been renounced by the original developer.
/**
372 * @dev Initializes the contract setting the deployer as the initial owner.
373 */
374 constructor () internal {
375 address msgSender = _msgSender();
376 _owner = msgSender;
377 emit OwnershipTransferred(address(0), msgSender);
378 }
379380 /**
381 * @dev Returns the address of the current owner.
382 */
383 function owner() public view returns (address) {
384 return _owner;
385 }
386387 /**
388 * @dev Throws if called by any account other than the owner.
389 */
390 modifier onlyOwner() {
391 require(_owner == _msgSender(), "Ownable: caller is not the owner");
392 _;
393 }
394395 /**
396 * @dev Leaves the contract without owner. It will not be possible to call
397 * `onlyOwner` functions anymore. Can only be called by the current owner.
398 *
399 * NOTE: Renouncing ownership will leave the contract without an owner,
400 * thereby removing any functionality that is only available to the owner.
401 */
402 function renounceOwnership() public virtual onlyOwner {
403 emit OwnershipTransferred(_owner, address(0));
404 _owner = address(0);
405 }
406407 /**
408 * @dev Transfers ownership of the contract to a new account (`newOwner`).
409 * Can only be called by the current owner.
410 */
411 function transferOwnership(address newOwner) public virtual onlyOwner {
412 require(newOwner != address(0), "Ownable: new owner is the zero address");
413 emit OwnershipTransferred(_owner, newOwner);
414 _owner = newOwner;
Does this mean that ownership is fully renounced and that no further functions can be called now that _owner = address(0) and _owner = newOwner. I assume that this now makes newOwner = address(0)
can anyone kindly explain these lines to me:
411 function transferOwnership(address newOwner) public virtual onlyOwner {
412 require(newOwner != address(0), “Ownable: new owner is the zero address”);
413 emit OwnershipTransferred(_owner, newOwner);
414 _owner = newOwner;
I would appreciate any assistance
Many thanks