# AdminControls

The `AdminControls` contract provides  management capabilities for the Fathom FXD Protocol. It is designed to configure and control core components of the system, allowing administrative actions such as pausing and unpausing protocol operations, setting key contract addresses, and managing permissions.

Administrative role can be assigned to the Governance or Multisig account.

#### State Variables:

1. **bookKeeper (`address public`)**: Stores the address of the `BookKeeper` contract which manages the core accounting logic for the protocol.
2. **liquidationEngine (`address public`)**: Holds the address of the `LiquidationEngine` contract responsible for handling the liquidation processes.
3. **priceOracle (`address public`)**: References the `PriceOracle` contract which provides price feeds for the assets.
4. **positionManager (`address public`)**: Points to the `PositionManager` contract that manages user positions.
5. **systemDebtEngine (`address public`)**: Contains the address of the `SystemDebtEngine` contract managing the system’s debt situations.
6. **flashMintModule (`address public`)**: Holds the address of the `FlashMintModule` for flash loan functionalities.
7. **stablecoinAdapter (`address public`)**: References the `StablecoinAdapter` which handles interactions related to the FXD stablecoin.

#### Functions:

* **pauseProtocol (`external`)**: Pauses all core components of the protocol to halt operations.
* **unpauseProtocol (`external`)**: Resumes operations of all core components after being paused.
* **setBookKeeper (`external, address _bookKeeper`)**: Updates the address of the `BookKeeper` contract.
* **setPositionManager (`external, address _positionManager`)**: Updates the address of the `PositionManager` contract.
* **setLiquidationEngine (`external, address _liquidationEngine`)**: Updates the address of the `LiquidationEngine` contract.
* **setSystemDebtEngine (`external, address _systemDebtEngine`)**: Updates the address of the `SystemDebtEngine` contract.
* **setFlashMintModule (`external, address _flashMintModule`)**: Updates the address of the `FlashMintModule` contract.
* **setPriceOracle (`external, address _priceOracle`)**: Updates the address of the `PriceOracle` contract.
* **setStablecoinAdapter (`external, address _stablecoinAdapter`)**: Updates the address of the `StablecoinAdapter` contract.

#### Events:

* **LogPauseProtocol (`event`)**: Emitted when the protocol is paused.
* **LogUnpauseProtocol (`event`)**: Emitted when the protocol is unpaused.
* **LogSetBookKeeper (`event, address indexed newAddress`)**: Emitted when the `BookKeeper` address is updated.
* **LogSetPositionManager (`event, address indexed newAddress`)**: Emitted when the `PositionManager` address is updated.
* **LogSetLiquidationEngine (`event, address indexed newAddress`)**: Emitted when the `LiquidationEngine` address is updated.
* **LogSetSystemDebtEngine (`event, address indexed newAddress`)**: Emitted when the `SystemDebtEngine` address is updated.
* **LogSetFlashMintModule (`event, address indexed newAddress`)**: Emitted when the `FlashMintModule` address is updated.
* **LogSetPriceOracle (`event, address indexed newAddress`)**: Emitted when the `PriceOracle` address is updated.
* **LogSetStablecoinAdapter (`event, address indexed newAddress`)**: Emitted when the `StablecoinAdapter` address is updated.


---

# 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.fathom.fi/fxd-stablecoin/interfaces/admincontrols.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.
