IOrchestratorFactory_v1.sol

Git Source

Functions

createOrchestrator

Creates a new {Orchestrator_v1}.

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

Parameters

NameTypeDescription

workflowConfig

WorkflowConfig

The workflow's config data.

fundingManagerConfig

ModuleConfig

The config data for the orchestrator's {IFundingManager_v1} instance.

authorizerConfig

ModuleConfig

The config data for the {Orchestrator_v1}'s {IAuthorizer_v1} instance.

paymentProcessorConfig

ModuleConfig

The config data for the orchestrator's {IPaymentProcessor_v1} instance.

moduleConfigs

ModuleConfig[]

Variable length set of optional module's config data.

Returns

NameTypeDescription

<none>

IOrchestrator_v1

CreatedOrchestrator Returns the created orchestrator instance

beacon

Returns the {IOrchestrator_v1} {IInverterBeacon_v1} address.

function beacon() external view returns (IInverterBeacon_v1);

Returns

NameTypeDescription

<none>

IInverterBeacon_v1

OrchestratorImplementationBeacon The {IInverterBeacon_v1} of the {Orchestrator_v1} Implementation.

moduleFactory

Returns the {IModuleFactory_v1} implementation address.

function moduleFactory() external view returns (address);

Returns

NameTypeDescription

<none>

address

ModuleFactoryAddress The address of the linked {ModuleFactory_v1}.

getOrchestratorByID

Returns the {IOrchestrator_v1} address that corresponds to the given id.

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

Parameters

NameTypeDescription

id

uint256

The requested orchestrator's id.

Returns

NameTypeDescription

<none>

address

orchestratorAddress The address of the corresponding {Orchestrator_v1}.

getOrchestratorIDCounter

Returns the counter of the current {Orchestrator_v1} id.

function getOrchestratorIDCounter() external view returns (uint);

Returns

NameTypeDescription

<none>

uint256

id The id of the next created {Orchestrator_v1}.

Events

OrchestratorCreated

Event emitted when a new {Orchestrator_v1} is created.

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

Parameters

NameTypeDescription

orchestratorId

uint256

The id of the {Orchestrator_v1}.

orchestratorAddress

address

The address of the {Orchestrator.

OrchestratorFactoryInitialized

Event emitted when a new {OrchestratorFactory_v1} is initialized.

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

Parameters

NameTypeDescription

beacon

address

The address of the {IInverterBeacon_v1} associated with the factory.

moduleFactory

address

The address of the {ModuleFactory_v1}.

Errors

OrchestratorFactory__InvalidBeacon

The provided beacon address doesnt support the interface {IInverterBeacon_v1}.

error OrchestratorFactory__InvalidBeacon();

OrchestratorFactory__InvalidId

Given id is invalid.

error OrchestratorFactory__InvalidId();

OrchestratorFactory__ModuleDataLengthMismatch

The module's data arrays length mismatch.

error OrchestratorFactory__ModuleDataLengthMismatch();

OrchestratorFactory__OrchestratorAdminIsInvalid

The orchestrator admin is address(0).

error OrchestratorFactory__OrchestratorAdminIsInvalid();

Structs

WorkflowConfig

Struct used to store information about a workflow configuration.

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

struct WorkflowConfig {
    bool independentUpdates;
    address independentUpdateAdmin;
}

Properties

NameTypeDescription

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.

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

Properties

NameTypeDescription

metadata

IModule_v1.Metadata

The module's metadata.

configData

bytes

Variable config data for specific module implementations.

Last updated