Administrable
Inherits: IAdministrable
Author: mortimr @ Kiln
This contract provides all the utilities to handle the administration and its transfer.
Unstructured Storage Friendly
State Variables
$admin
The admin address in storage.
Slot: keccak256(bytes("administrable.admin")) - 1
types.Address internal constant $admin =
types.Address.wrap(0x927a17e5ea75d9461748062a2652f4d3698a628896c9832f8488fa0d2846af09);
$pendingAdmin
The pending admin address in storage.
Slot: keccak256(bytes("administrable.pendingAdmin")) - 1
types.Address internal constant $pendingAdmin =
types.Address.wrap(0x3c1eebcc225c6cc7f5f8765767af6eff617b4139dc3624923a2db67dbca7b68e);
Functions
onlyAdmin
This modifier ensures that only the admin is able to call the method.
modifier onlyAdmin();
onlyPendingAdmin
This modifier ensures that only the pending admin is able to call the method.
modifier onlyPendingAdmin();
admin
Retrieve the admin address.
function admin() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | adminAddress The admin address |
pendingAdmin
Retrieve the pending admin address.
function pendingAdmin() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | pendingAdminAddress The pending admin address |
transferAdmin
Propose a new admin.
Only callable by the admin.
function transferAdmin(address newAdmin) external onlyAdmin;
Parameters
| Name | Type | Description |
|---|---|---|
newAdmin | address | The new admin to propose |
acceptAdmin
Accept an admin transfer.
Only callable by the pending admin.
function acceptAdmin() external onlyPendingAdmin;
_getAdmin
Retrieve the admin address.
function _getAdmin() internal view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The admin address |
_setAdmin
Change the admin address.
function _setAdmin(address newAdmin) internal;
Parameters
| Name | Type | Description |
|---|---|---|
newAdmin | address | The new admin address |
_getPendingAdmin
Retrieve the pending admin address.
function _getPendingAdmin() internal view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The pending admin address |
_setPendingAdmin
Change the pending admin address.
function _setPendingAdmin(address newPendingAdmin) internal;
Parameters
| Name | Type | Description |
|---|---|---|
newPendingAdmin | address | The new pending admin address |