Ownable
contract Ownable
Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. * This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be aplied to your functions to restrict their use to the owner.
Index
Reference
Events
OwnershipTransferred
event OwnershipTransferred(address previousOwner, address newOwner)
- Parameters:
previousOwner
- addressnewOwner
- address
Modifiers
onlyOwner
modifier onlyOwner()
Throws if called by any account other than the owner.
Functions
_transferOwnership
function _transferOwnership(address newOwner) internal
Transfers ownership of the contract to a new account (`newOwner`).
- Parameters:
newOwner
- address
fallback
function () internal
Initializes the contract setting the deployer as the initial owner.
isOwner
function isOwner() public view returns (bool)
Returns true if the caller is the current owner.
- Returns:
- bool
owner
function owner() public view returns (address)
Returns the address of the current owner.
- Returns:
- address
renounceOwnership
function renounceOwnership() public
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.
- Modifiers:
- onlyOwner
transferOwnership
function transferOwnership(address newOwner) public
Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
- Modifiers:
- onlyOwner
- Parameters:
newOwner
- address