# IExtensionRegistry

## Methods

### addExtension

```solidity
function addExtension(IExtension.Extension extension) external nonpayable
```

#### Parameters

| Name      | Type                 | Description |
| --------- | -------------------- | ----------- |
| extension | IExtension.Extension | undefined   |

### getAllExtensions

```solidity
function getAllExtensions() external view returns (struct IExtension.Extension[])
```

*Returns all extensions stored.*

#### Returns

| Name | Type                    | Description |
| ---- | ----------------------- | ----------- |
| \_0  | IExtension.Extension\[] | undefined   |

### getAllFunctionsOfExtension

```solidity
function getAllFunctionsOfExtension(string extensionName) external view returns (struct IExtension.ExtensionFunction[])
```

*Returns all functions that belong to the given extension contract.*

#### Parameters

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| extensionName | string | undefined   |

#### Returns

| Name | Type                            | Description |
| ---- | ------------------------------- | ----------- |
| \_0  | IExtension.ExtensionFunction\[] | undefined   |

### getExtension

```solidity
function getExtension(string extensionName) external view returns (struct IExtension.Extension)
```

*Returns the extension metadata and functions for a given extension.*

#### Parameters

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| extensionName | string | undefined   |

#### Returns

| Name | Type                 | Description |
| ---- | -------------------- | ----------- |
| \_0  | IExtension.Extension | undefined   |

### getExtensionForFunction

```solidity
function getExtensionForFunction(bytes4 functionSelector) external view returns (struct IExtension.ExtensionMetadata)
```

*Returns the extension metadata for a given function.*

#### Parameters

| Name             | Type   | Description |
| ---------------- | ------ | ----------- |
| functionSelector | bytes4 | undefined   |

#### Returns

| Name | Type                         | Description |
| ---- | ---------------------------- | ----------- |
| \_0  | IExtension.ExtensionMetadata | undefined   |

### getExtensionImplementation

```solidity
function getExtensionImplementation(string extensionName) external view returns (address)
```

*Returns the extension's implementation smart contract address.*

#### Parameters

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| extensionName | string | undefined   |

#### Returns

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

### removeExtension

```solidity
function removeExtension(string extension) external nonpayable
```

*Remove an existing extension from the registry.*

#### Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| extension | string | undefined   |

### updateExtension

```solidity
function updateExtension(IExtension.Extension extension) external nonpayable
```

#### Parameters

| Name      | Type                 | Description |
| --------- | -------------------- | ----------- |
| extension | IExtension.Extension | undefined   |

## Events

### ExtensionAdded

```solidity
event ExtensionAdded(address indexed extensionAddress, bytes4 indexed functionSelector, string functionSignature)
```

#### Parameters

| Name                       | Type    | Description |
| -------------------------- | ------- | ----------- |
| extensionAddress `indexed` | address | undefined   |
| functionSelector `indexed` | bytes4  | undefined   |
| functionSignature          | string  | undefined   |

### ExtensionRemoved

```solidity
event ExtensionRemoved(address indexed extensionAddress, bytes4 indexed functionSelector, string functionSignature)
```

#### Parameters

| Name                       | Type    | Description |
| -------------------------- | ------- | ----------- |
| extensionAddress `indexed` | address | undefined   |
| functionSelector `indexed` | bytes4  | undefined   |
| functionSignature          | string  | undefined   |

### ExtensionUpdated

```solidity
event ExtensionUpdated(address indexed oldExtensionAddress, address indexed newExtensionAddress, bytes4 indexed functionSelector, string functionSignature)
```

#### Parameters

| Name                          | Type    | Description |
| ----------------------------- | ------- | ----------- |
| oldExtensionAddress `indexed` | address | undefined   |
| newExtensionAddress `indexed` | address | undefined   |
| functionSelector `indexed`    | bytes4  | undefined   |
| functionSignature             | string  | undefined   |
