OwnableAccessManager
OwnableAccessManager
A middleware extension that restricts access to a single owner address
Implements AccessManager with owner-based access control
Methods
__OwnableAccessManager_init
function __OwnableAccessManager_init(
address owner_
) internal onlyInitializing
Initializes the contract with an owner address
Parameters
Name | Type | Description |
---|---|---|
owner_ | address | The address to set as the owner |
owner
function owner() public view returns (address)
Error thrown when a non-owner address attempts to call a restricted function
Returns
Name | Type | Description |
---|---|---|
address |
_checkAccess
function _checkAccess() internal view virtual override
Checks if the caller has access (is the owner)
Reverts if the caller is not the owner
setOwner
function setOwner(
address owner_
) public checkAccess
Updates the owner address
Can only be called by the current owner
Parameters
Name | Type | Description |
---|---|---|
owner_ | address | The new owner address |
renounceOwnership
function renounceOwnership() public virtual
Renounces the ownership of the contract
Can only be called by the current owner