# AllowedControllers

The AllowedControllers contract manages the allowed delegation and lock controllers within the Unlockd Wallet. It determines which addresses are authorized to perform delegation and locking operations.&#x20;

## Key Functions:

<pre class="language-solidity"><code class="lang-solidity"><strong>function setCollectionAllowance(address _collection, bool _allowed) external;
</strong></code></pre>

Sets the allowance status of a collection controller.

### Parameters:

`_collection` (address): The address of the collection.

`_allowed` (bool): A boolean indicating whether the collection controller is allowed.&#x20;

### Interactions:

Emits the `Collections` event when the allowance status of a collection is set.

***

```solidity
function setCollectionsAllowances(
    address[] calldata _collections, 
    bool[] calldata _allowances
) external;
```

Sets the allowance statuses of multiple collection controllers.

### Parameters:

`_collections` (address\[]): An array of collection addresses.

`_allowances` (bool\[]): An array of allowance statuses corresponding to the collections.&#x20;

### Interactions:

Emits the `Collections` event for each collection allowance status set.

***

```solidity
function setDelegationControllerAllowance(
    address _controller, 
    bool _allowed
) external;
```

Sets the allowance status of a delegation controller.

### Parameters:

`_controller` (address): The address of the delegation controller.

`_allowed` (bool): A boolean indicating whether the delegation controller is allowed.&#x20;

### Interactions:

Emits the `DelegationController` event when the allowance status of a delegation controller is set.

***

```solidity
function setDelegationControllerAllowances(
    address[] calldata _controllers, 
    bool[] calldata _allowances
) external;
```

Sets the allowance statuses of multiple delegation controllers.

### Parameters:

`_controllers` (address\[]): An array of delegation controller addresses.

`_allowances` (bool\[]): An array of allowance statuses corresponding to the controllers.&#x20;

### Interactions:

Emits the `DelegationController` event for each delegation controller allowance status set.

***

```solidity
function isAllowedCollection(
    address _collection
) external view returns (bool);#
```

Checks if a collection address is allowed

### Parameters:

`_collection` (address): The address of the collection.&#x20;

### Returns:

(bool): A boolean indicating whether the collection is allowed.

***

```solidity
function isAllowedDelegationController(address _controller) external view returns (bool);
```

Checks if an address is an allowed delegation controller.

### Parameters:

`_controller` (address): The address of the delegation controller.&#x20;

### Returns:

(bool): A boolean indicating whether the delegation controller is allowed.


---

# 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/unlockd-account-wallet/allowedcontrollers.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.
