Ownable (Ownable.sol)

View Source: openzeppelin-solidity/contracts/ownership/Ownable.sol

↘ Derived Contracts: MakerDAOOracle, ModuleFactory, ReclaimTokens, StableOracle, STFactory

Ownable

The Ownable contract has an owner address, and provides basic authorization control functions, this simplifies the implementation of "user permissions".

Contract Members

Constants & Variables

address private _owner;

Events

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

Modifiers

onlyOwner

Throws if called by any account other than the owner.

modifier onlyOwner() internal

Arguments

Name

Type

Description

Functions

The Ownable constructor sets the original owner of the contract to the sender account.

function () internal nonpayable

Arguments

Name

Type

Description

owner

function owner() public view
returns(address)

Returns

the address of the owner.

Arguments

Name

Type

Description

isOwner

function isOwner() public view
returns(bool)

Returns

true if msg.sender is the owner of the contract.

Arguments

Name

Type

Description

renounceOwnership

Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

function renounceOwnership() public nonpayable onlyOwner

Arguments

Name

Type

Description

transferOwnership

Allows the current owner to transfer control of the contract to a newOwner.

function transferOwnership(address newOwner) public nonpayable onlyOwner

Arguments

Name

Type

Description

newOwner

address

The address to transfer ownership to.

_transferOwnership

Transfers control of the contract to a newOwner.

function _transferOwnership(address newOwner) internal nonpayable

Arguments

Name

Type

Description

newOwner

address

The address to transfer ownership to.

Last updated

Was this helpful?