Allows inheriting contracts to have an owner and provides the
onlyOwner modifier, which restricts function access to that owner.
The owner can be changed by a nomination process, where the nominated owner must accept ownership before it is switched.
The contract owner.
The currently-nominated owner.
Initialises the owner of this contract.
constructor(address _owner) public
- The initial owner cannot be the zero address.
Nominates a new owner of this contract, who may then call
acceptOwnership to become the owner.
nominateNewOwner(address _owner) external
If called by
nominatedOwner, ownership is transferred to that address.
The nominated owner is reset to the zero address.
- The caller must be
Reverts the transaction if
msg.sender is not the
newOwner has been set as the
Ownership has been handed over from
newOwner, which is the new value of
OwnerChanged(address oldOwner, address newOwner)