> For the complete documentation index, see [llms.txt](https://docs.fathom.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fathom.fi/fxd-stablecoin/interfaces/admincontrols.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.fathom.fi/fxd-stablecoin/interfaces/admincontrols.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
