SafeOwnable
SafeOwnable
_owner
address _owner
_pendingOwner
address _pendingOwner
OwnershipTransferred
event OwnershipTransferred(address previousOwner, address newOwner)
constructor
constructor(address owner_) public
Initializes the contract setting the owner manually.
owner
function owner() public view virtual returns (address)
Returns the address of the current owner.
pendingOwner
function pendingOwner() public view virtual returns (address)
Return the address of the pending owner
onlyOwner
modifier onlyOwner()
Throws if called by any account other than the owner.
renounceOwnership
function renounceOwnership() public virtual
Leaves the contract without owner. It will not be possible to call
onlyOwner
functions anymore. Can only be called by the current owner.
NOTE: Renouncing ownership will leave the contract without an owner,
thereby removing any functionality that is only available to the owner.
transferOwnership
function transferOwnership(address newOwner, bool direct) public virtual
Transfers ownership of the contract to a new account (newOwner
).
Can only be called by the current owner.
Note If direct is false, it will set an pending owner and the OwnerShipTransferring
only happens when the pending owner claim the ownership
claimOwnership
function claimOwnership() public
pending owner call this function to claim ownership
_transferOwnership
function _transferOwnership(address newOwner) internal virtual
Transfers ownership of the contract to a new account (newOwner
).
Internal function without access restriction.
_transferPendingOwnership
function _transferPendingOwnership(address newOwner) internal virtual
set the pending owner address Internal function without access restriction.
_claimOwnership
function _claimOwnership() internal virtual
claim ownership of the contract to a new account (newOwner
).
Internal function without access restriction.
_checkOwner
function _checkOwner() internal view virtual
Throws if the sender is not the owner.