# Operatable

#### Extends

[BoringOwnable](https://github.com/boringcrypto/BoringSolidity/blob/master/contracts/BoringOwnable.sol)

## Initialization

### constructor

```solidity
constructor()
```

#### Description

Initializes a new Operatable instance (adding `msg.sender` to [operators](#operators)).

## Write Methods

### setOperator

```solidity
function setOperator(address operator, bool status) external onlyOwner
```

#### Description

Allows owner to add/remove operators.

#### Parameters

| Name     | Type      | Description                      |
| -------- | --------- | -------------------------------- |
| operator | `address` | The operator's address.          |
| status   | `bool`    | The status to set to `operator`. |

#### Emits

[OperatorChanged](#operatorchanged)

## View Methods

### operators

```solidity
mapping(address => bool) public operators;
```

#### Description

Maps each active operator's address to `true`.

## Modifiers

### onlyOperators

```solidity
modifier onlyOperators()
```

#### Description

Checks  if  `msg.sender` is an operator.

#### Throws

[NotAllowedOperator](#notallowedoperator)

## Events

### OperatorChanged

```solidity
event OperatorChanged(address indexed, bool)
```

#### Parameters

| Name     | Type      | Index? |
| -------- | --------- | ------ |
| operator | `address` | Yes    |
| status   | `bool`    | No     |

## Errors

### NotAllowedOperator

```solidity
error NotAllowedOperator()
```


---

# 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://dev.alloy.tether.to/pheriphery-contracts/operatable.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.
