# AdminControlled

[Git Source](https://github.com/EntreDevelopers-Lab-Inc/Mezz-Companies/blob/f7a3e84e3dd5bb33c4bd7f77283983f9e8ba20b2/src/core/base/AdminControlled.sol)

**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

```solidity
bytes32 private constant AdminControlledStorageLocation =
    0xe8d3a2e05e64290a0f2256f86af6161ca7eebf433b9b144d23028b2415816200;
```

## Functions

### \_getAdminControlledStorage

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

### onlyAdmin

*Reverts if the caller is not the board or an admin*

```solidity
modifier onlyAdmin();
```

### addAdmin

Adds 'adminToAdd' to the list of admins

```solidity
function addAdmin(address adminToAdd) external onlyBoard;
```

### removeAdmin

Removes 'adminToRemove' from the list of admins

```solidity
function removeAdmin(address adminToRemove) external onlyBoard;
```

### isAdmin

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

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

### getAdmins

Returns the list of admins

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

### \_validateCallerIsBoardOrAdmin

*Reverts if the caller is not the board or an admin*

```solidity
function _validateCallerIsBoardOrAdmin() internal view virtual;
```

### \_isCallerBoardOrAdmin

*Returns true if the caller is the board or an admin*

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

## Structs

### AdminControlledStorage

```solidity
struct AdminControlledStorage {
    EnumerableSet.AddressSet _admins;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mezzanine.xyz/smart-contracts/source-code/core/base/admincontrolled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
