> 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/factories/interfaces/iorchestratorfactory_v1.sol.md).

# IOrchestratorFactory\_v1.sol

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

### Functions

#### createOrchestrator

Creates a new [{Orchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/orchestrator_v1.sol).

```solidity
function createOrchestrator(
    WorkflowConfig memory workflowConfig,
    ModuleConfig memory fundingManagerConfig,
    ModuleConfig memory authorizerConfig,
    ModuleConfig memory paymentProcessorConfig,
    ModuleConfig[] memory moduleConfigs
) external returns (IOrchestrator_v1);
```

**Parameters**

| Name                     | Type             | Description                                                                                                                                                                                                                                         |
| ------------------------ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `workflowConfig`         | `WorkflowConfig` | The workflow's config data.                                                                                                                                                                                                                         |
| `fundingManagerConfig`   | `ModuleConfig`   | The config data for the orchestrator's [{IFundingManager\_v1} ](/contracts/technical-reference/modules/funding-manager/ifundingmanager_v1.sol.md)instance.                                                                                          |
| `authorizerConfig`       | `ModuleConfig`   | The config data for the [{Orchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/orchestrator_v1.sol)'s [{IAuthorizer\_v1} ](/contracts/technical-reference/modules/authorizer/iauthorizer_v1.sol.md)instance. |
| `paymentProcessorConfig` | `ModuleConfig`   | The config data for the orchestrator's [{IPaymentProcessor\_v1} ](/contracts/technical-reference/modules/payment-processor/ipaymentprocessor_v1.sol.md)instance.                                                                                    |
| `moduleConfigs`          | `ModuleConfig[]` | Variable length set of optional module's config data.                                                                                                                                                                                               |

**Returns**

| Name     | Type               | Description                                                   |
| -------- | ------------------ | ------------------------------------------------------------- |
| `<none>` | `IOrchestrator_v1` | CreatedOrchestrator Returns the created orchestrator instance |

#### beacon

Returns the [{IOrchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/interfaces/iorchestrator_v1.sol) [{IInverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/interfaces/iinverterbeacon_v1.sol) address.

```solidity
function beacon() external view returns (IInverterBeacon_v1);
```

**Returns**

| Name     | Type                 | Description                                                                                                                                                                                                                                                                                                   |
| -------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<none>` | `IInverterBeacon_v1` | OrchestratorImplementationBeacon The [{IInverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/interfaces/iinverterbeacon_v1.sol) of the [{Orchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/orchestrator_v1.sol) Implementation. |

#### moduleFactory

Returns the [{IModuleFactory\_v1} ](/contracts/technical-reference/factories/interfaces/imodulefactory_v1.sol.md)implementation address.

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

**Returns**

| Name     | Type      | Description                                                                                                                                                                   |
| -------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<none>` | `address` | ModuleFactoryAddress The address of the linked [{ModuleFactory\_v1}](https://docs.inverter.network/contracts/technical-reference/factories/interfaces/imodulefactory_v1.sol). |

#### getOrchestratorByID

Returns the [{IOrchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/interfaces/iorchestrator_v1.sol) address that corresponds to the given id.

```solidity
function getOrchestratorByID(uint id) external view returns (address);
```

**Parameters**

| Name | Type      | Description                      |
| ---- | --------- | -------------------------------- |
| `id` | `uint256` | The requested orchestrator's id. |

**Returns**

| Name     | Type      | Description                                                                                                                                                              |
| -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `<none>` | `address` | orchestratorAddress The address of the corresponding [{Orchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/orchestrator_v1.sol). |

#### getOrchestratorIDCounter

Returns the counter of the current [{Orchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/orchestrator_v1.sol) id.

```solidity
function getOrchestratorIDCounter() external view returns (uint);
```

**Returns**

| Name     | Type      | Description                                                                                                                                       |
| -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<none>` | `uint256` | id The id of the next created [{Orchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/orchestrator_v1.sol). |

### Events

#### OrchestratorCreated

Event emitted when a new [{Orchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/orchestrator_v1.sol) is created.

```solidity
event OrchestratorCreated(
    uint indexed orchestratorId, address indexed orchestratorAddress
);
```

**Parameters**

| Name                  | Type      | Description                                                                                                                       |
| --------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `orchestratorId`      | `uint256` | The id of the [{Orchestrator\_v1}](https://docs.inverter.network/contracts/technical-reference/orchestrator/orchestrator_v1.sol). |
| `orchestratorAddress` | `address` | The address of the {Orchestrator.                                                                                                 |

#### OrchestratorFactoryInitialized

Event emitted when a new [{OrchestratorFactory\_v1}](/contracts/technical-reference/factories/interfaces/iorchestratorfactory_v1.sol.md) is initialized.

```solidity
event OrchestratorFactoryInitialized(
    address indexed beacon, address indexed moduleFactory
);
```

**Parameters**

| Name            | Type      | Description                                                                                                                                                                    |
| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `beacon`        | `address` | The address of the [{IInverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/interfaces/iinverterbeacon_v1.sol) associated with the factory. |
| `moduleFactory` | `address` | The address of the [{ModuleFactory\_v1}](https://docs.inverter.network/contracts/technical-reference/factories/interfaces/imodulefactory_v1.sol).                              |

### Errors

#### OrchestratorFactory\_\_InvalidBeacon

The provided beacon address doesnt support the interface [{IInverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/interfaces/iinverterbeacon_v1.sol).

```solidity
error OrchestratorFactory__InvalidBeacon();
```

#### OrchestratorFactory\_\_InvalidId

Given id is invalid.

```solidity
error OrchestratorFactory__InvalidId();
```

#### OrchestratorFactory\_\_ModuleDataLengthMismatch

The module's data arrays length mismatch.

```solidity
error OrchestratorFactory__ModuleDataLengthMismatch();
```

#### OrchestratorFactory\_\_OrchestratorAdminIsInvalid

The orchestrator admin is address(0).

```solidity
error OrchestratorFactory__OrchestratorAdminIsInvalid();
```

### Structs

#### WorkflowConfig

Struct used to store information about a workflow configuration.

*When the `independentUpdates` is true, the `independentUpdateAdmin` will be disregarded.*

```solidity
struct WorkflowConfig {
    bool independentUpdates;
    address independentUpdateAdmin;
}
```

**Properties**

| Name                     | Type      | Description                                                                                                                                  |
| ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `independentUpdates`     | `bool`    | bool wether the workflow should use the independent proxy structure. In case of true it will not use the standard beacon proxy structure.    |
| `independentUpdateAdmin` | `address` | The address that will be assigned the admin role of the independent update proxy. Will be disregarded in case `independentUpdates` is false. |

#### ModuleConfig

Struct used to store information about a module configuration.

```solidity
struct ModuleConfig {
    IModule_v1.Metadata metadata;
    bytes configData;
}
```

**Properties**

| Name         | Type                  | Description                                               |
| ------------ | --------------------- | --------------------------------------------------------- |
| `metadata`   | `IModule_v1.Metadata` | The module's metadata.                                    |
| `configData` | `bytes`               | Variable config data for specific module implementations. |
