> For the complete documentation index, see [llms.txt](https://docs.inverter.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inverter.network/contracts/technical-reference/orchestrator/interfaces/imodulemanagerbase_v1.sol.md).

# IModuleManagerBase\_v1.sol

[Git Source](https://github.com/InverterNetwork/inverter-contracts/blob/2a8a4c80ff4f24a59546d4e6126b81bc51228c94/src/orchestrator/interfaces/IModuleManagerBase_v1.sol)

**Inherits:** [IERC2771Context](/contracts/technical-reference/external/interfaces/ierc2771context.sol.md)

### Functions

#### isModule

Returns whether the address `module` is added as module.

```solidity
function isModule(address module) external view returns (bool);
```

**Parameters**

| Name     | Type      | Description          |
| -------- | --------- | -------------------- |
| `module` | `address` | The module to check. |

**Returns**

| Name     | Type   | Description                            |
| -------- | ------ | -------------------------------------- |
| `<none>` | `bool` | True if module added, false otherwise. |

#### listModules

Returns the list of all modules.

```solidity
function listModules() external view returns (address[] memory);
```

**Returns**

| Name     | Type        | Description          |
| -------- | ----------- | -------------------- |
| `<none>` | `address[]` | List of all modules. |

#### modulesSize

Returns the number of modules.

```solidity
function modulesSize() external view returns (uint8);
```

**Returns**

| Name     | Type    | Description            |
| -------- | ------- | ---------------------- |
| `<none>` | `uint8` | The number of modules. |

#### isTrustedForwarder

Returns wether the given address is the trusted forwarder or not.

*Exposes the ERC2771 isTrusted Forwarder.*

```solidity
function isTrustedForwarder(address forwarder) external view returns (bool);
```

**Parameters**

| Name        | Type      | Description           |
| ----------- | --------- | --------------------- |
| `forwarder` | `address` | The address to check. |

**Returns**

| Name     | Type   | Description                                                    |
| -------- | ------ | -------------------------------------------------------------- |
| `<none>` | `bool` | True if the address is the trusted forwarder, false otherwise. |

#### trustedForwarder

Returns the trusted forwarder for metatransactions.

*Exposes the ERC2771 isTrusted Forwarder.*

```solidity
function trustedForwarder() external view returns (address);
```

**Returns**

| Name     | Type      | Description                    |
| -------- | --------- | ------------------------------ |
| `<none>` | `address` | The trusted forwarder address. |

### Events

#### ModuleAdded

Event emitted when module added.

```solidity
event ModuleAdded(address indexed module);
```

**Parameters**

| Name     | Type      | Description           |
| -------- | --------- | --------------------- |
| `module` | `address` | The module's address. |

#### ModuleRemoved

Event emitted when module removed.

```solidity
event ModuleRemoved(address indexed module);
```

**Parameters**

| Name     | Type      | Description           |
| -------- | --------- | --------------------- |
| `module` | `address` | The module's address. |

#### ModuleTimelockStarted

Event emitted when updating a module is initiated, and the timelock starts;.

```solidity
event ModuleTimelockStarted(address module, uint timelockUntil);
```

**Parameters**

| Name            | Type      | Description                                      |
| --------------- | --------- | ------------------------------------------------ |
| `module`        | `address` | The module's address.                            |
| `timelockUntil` | `uint256` | The unix timestamp until the timelock is active. |

#### ModuleUpdateCanceled

Event emitted when a module update is canceled.

```solidity
event ModuleUpdateCanceled(address module);
```

**Parameters**

| Name     | Type      | Description           |
| -------- | --------- | --------------------- |
| `module` | `address` | The module's address. |

### Errors

#### ModuleManagerBase\_\_CallerNotAuthorized

Function is only callable by authorized address.

```solidity
error ModuleManagerBase__CallerNotAuthorized();
```

#### ModuleManagerBase\_\_OnlyCallableByModule

Function is only callable by modules.

```solidity
error ModuleManagerBase__OnlyCallableByModule();
```

#### ModuleManagerBase\_\_InvalidModuleAddress

Given module address invalid.

```solidity
error ModuleManagerBase__InvalidModuleAddress();
```

#### ModuleManagerBase\_\_IsModule

Given address is a module.

```solidity
error ModuleManagerBase__IsModule();
```

#### ModuleManagerBase\_\_IsNotModule

Given address is not a module.

```solidity
error ModuleManagerBase__IsNotModule();
```

#### ModuleManagerBase\_\_ModuleAmountOverLimits

The {ModuleManagerBase\_v1} has reached the maximum amount of modules.

```solidity
error ModuleManagerBase__ModuleAmountOverLimits();
```

#### ModuleManagerBase\_\_ModuleUpdateTimelockStillActive

Timelock still active for the given module address.

```solidity
error ModuleManagerBase__ModuleUpdateTimelockStillActive(
    address _module, uint _timelockUntil
);
```

**Parameters**

| Name             | Type      | Description                                      |
| ---------------- | --------- | ------------------------------------------------ |
| `_module`        | `address` | The module address.                              |
| `_timelockUntil` | `uint256` | The unix timestamp until the timelock is active. |

#### ModuleManagerBase\_\_ModuleUpdateAlreadyStarted

Module update is already in progress.

```solidity
error ModuleManagerBase__ModuleUpdateAlreadyStarted();
```

#### ModuleManagerBase\_\_ModuleNotRegistered

Module has not been registered in our factory.

```solidity
error ModuleManagerBase__ModuleNotRegistered();
```

#### ModuleManagerBase\_\_ModuleFactoryInvalid

Referenced {ModuleFactory\_v1} is invalid.

```solidity
error ModuleManagerBase__ModuleFactoryInvalid();
```

### Structs

#### ModuleUpdateTimelock

The timelock struct to keep track of updating the registered modules.

```solidity
struct ModuleUpdateTimelock {
    bool timelockActive;
    uint timelockUntil;
}
```

**Properties**

| Name             | Type      | Description                                                        |
| ---------------- | --------- | ------------------------------------------------------------------ |
| `timelockActive` | `bool`    | Is the timelock currently active.                                  |
| `timelockUntil`  | `uint256` | Timestamp that represents from when the update can be carried out. |
