AdminControlled

Git Source

Inherits: BoardControlled, IAdminControlled

Author: Daniel Yamagata

A base contract that is inherited by contracts meant to be controlled by a company's board of directors and a set of admins

State Variables

AdminControlledStorageLocation

bytes32 private constant AdminControlledStorageLocation =
    0xe8d3a2e05e64290a0f2256f86af6161ca7eebf433b9b144d23028b2415816200;

Functions

_getAdminControlledStorage

function _getAdminControlledStorage() internal pure returns (AdminControlledStorage storage $);

onlyAdmin

Reverts if the caller is not the board or an admin

modifier onlyAdmin();

addAdmin

Adds 'adminToAdd' to the list of admins

function addAdmin(address adminToAdd) external onlyBoard;

removeAdmin

Removes 'adminToRemove' from the list of admins

function removeAdmin(address adminToRemove) external onlyBoard;

isAdmin

Returns true if the 'adminToCheck' is part of the admins set

function isAdmin(address adminToCheck) public view returns (bool);

getAdmins

Returns the list of admins

function getAdmins() public view returns (address[] memory);

_validateCallerIsBoardOrAdmin

Reverts if the caller is not the board or an admin

function _validateCallerIsBoardOrAdmin() internal view virtual;

_isCallerBoardOrAdmin

Returns true if the caller is the board or an admin

function _isCallerBoardOrAdmin() internal view virtual returns (bool);

Structs

AdminControlledStorage

struct AdminControlledStorage {
    EnumerableSet.AddressSet _admins;
}

Last updated