# Manager

`Manager.sol` is a module contract that provides management functionality for the Unlockd Protocol. It allows authorized users to set and update various protocol parameters. e

Key functions:

```solidity
function setSafeERC721(address safeERC721)
```

Sets the address of the SafeERC721 contract. Only callable by the admin role.

### Parameters:

`safeERC721`: The address of the SafeERC721 contract to be set.

***

```solidity
function getSafeERC721() external view returns (address)
```

Returns the address of the SafeERC721 contract.

***

```solidity
function setReserveOracle(address oracle) external onlyAdmin
```

Sets the address of the reserve oracle contract. Only callable by the admin role.

### Parameters:

`oracle`: The address of the reserve oracle contract to be set.

***

```solidity
function getReserveOracle() external view returns (address)
```

Returns the address of the reserve oracle contract.

***

```solidity
function setSigner(address signer) external onlyAdmin
```

Sets the address of the signer used for signature verification. Only callable by the admin role.

### Parameters:

`signer`: The address of the signer to be set.

***

```solidity
function getSigner() external view returns (address)
```

Returns the address of the signer used for signature verification.

***

```solidity
function setWalletRegistry(address walletRegistry) external onlyAdmin
```

Sets the address of the wallet registry contract. Only callable by the admin role.

### Parameters:

`walletRegistry`: The address of the wallet registry contract to be set.

***

```solidity
function getWalletRegistry() external view returns (address)
```

Returns the address of the wallet registry contract.

***

```solidity
function setAllowedControllers(
    address allowedControllers
) external onlyAdmin
```

Sets the address of the allowed controller contract. Only callable by the admin role.

### Parameters:

`allowedControllers`: The address of the allowed controller contract to be set.

***

```solidity
function getCollectionReserveType(
    address collection
 ) external view returns (Constants.ReserveType)
```

Returns the address of the allowed controller contract.

***

```solidity
function allowCollectionReserveType(
    address collection,
    Constants.ReserveType reserveType
  ) external onlyAdmin
```

Allows a specific collection and reserve type combination. Only callable by the admin role.

### Parameters:

`collection`: The address of the collection to be allowed.

`reserveType`: The reserve type to be associated with the collection.

***

```solidity
function getCollectionReserveType(
    address collection
  ) external view returns (Constants.ReserveType)
```

Returns the reserve type associated with a given collection.

### Parameters:

`collection`: The address of the collection.

***

```solidity
function setUTokenVault(address uTokenVault) external onlyAdmin
```

Sets the address of the UTokenVault contract. Only callable by the admin role.

### Parameters:

`uTokenVault`: The address of the UTokenVault contract to be set.

***

```solidity
function getUTokenVault() external view returns (address)
```

Returns the address of the UTokenVault contract.

***

```solidity
function addMarketAdapters(
    address adapter, 
    bool active
) external onlyGovernance
```

Adds or removes a market adapter from the allowed list. Only callable by the governance role.

### Parameters:

`adapter`: The address of the market adapter to be added or removed.

`active`: A boolean indicating whether the adapter should be active or not.

***

```solidity
function isMarketAdapterActive(address adapter) external view returns (uint256)
```

Returns the status of a market adapter (active or disabled).

### Parameters:

`adapter`: The address of the market adapter.

***

```solidity
function emergencyFreezeLoan(bytes32 loanId) external onlyEmergency
function emergencyActivateLoan(bytes32 loanId) external onlyEmergency
function emergencyBlockLoan(bytes32 loanId) external onlyEmergency
```

Emergency functions to freeze, activate, or block a loan. Only callable by the emergency admin role.

### Parameters:

`loanId`: The ID of the loan to be frozen, activated, or blocked.

***

```solidity
function emergencyUpdateEndTimeAuction(
    bytes32 orderId,
    uint40 newEndTime
  ) external onlyEmergency 
```

Emergency function to update the end time of an auction. Only callable by the emergency admin role.

### Parameters:

`orderId`: The ID of the order associated with the auction.

`newEndTime`: The new end time for the auction.


---

# 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://devs.unlockd.finance/modules/debt-tokens-1.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.
