# 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.
