# DelegationRecipes

The DelegationRecipes contract registers and manages allowed functions for specific asset collections. It defines the rules and permissions for asset delegation within the Unlockd Wallet.&#x20;

## Key Functions:

```solidity
function add(
    address _collection, 
    address[] calldata _contracts, 
    bytes4[] calldata _selectors, 
    string[] calldata _descriptions
) external
```

Adds a group of allowed functions for a specific asset collection.

### Parameters:

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

`_contracts` (address\[]): An array of target contract addresses.

`_selectors` (bytes4\[]): An array of allowed function selectors.

`_descriptions` (string\[]): An array of function descriptions.

***

```solidity
function remove(
    address _collection, 
    address[] calldata _contracts, 
    bytes4[] calldata _selectors
) external
```

Removes a group of allowed functions from a specific asset collection.

### Parameters:

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

`_contracts` (address\[]): An array of target contract addresses.

`_selectors` (bytes4\[]): An array of function selectors to remove.

***

```solidity
function isAllowedFunction(
    address _collection, 
    address _contract, 
    bytes4 _selector
) external view returns (bool)
```

Checks if a function is allowed for a given asset collection.

### Parameters:

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

`_contract` (address): The address of the target contract.

`_selector` (bytes4): The function selector.

### Returns:

A boolean indicating whether the function is allowed for the asset collection.

***

## Interactions:

* Interacts with the DelegationOwner contract to determine allowed functions for asset delegation.


---

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