IModuleFactory_v1.sol

Git Source

Functions

reverter

Returns the address of the {InverterReverter_v1} contract.

function reverter() external view returns (address);

Returns

Name
Type
Description

<none>

address

governor

Returns the {Governor_v1} contract address.

function governor() external view returns (address);

Returns

Name
Type
Description

<none>

address

createAndInitModule

Creates a module instance identified by given metadata and initiates it.

function createAndInitModule(
    IModule_v1.Metadata memory metadata,
    IOrchestrator_v1 orchestrator,
    bytes memory configData,
    IOrchestratorFactory_v1.WorkflowConfig memory workflowConfig
) external returns (address);

Parameters

Name
Type
Description

metadata

IModule_v1.Metadata

The module's metadata.

orchestrator

IOrchestrator_v1

configData

bytes

The configData of the module.

workflowConfig

IOrchestratorFactory_v1.WorkflowConfig

The configData of the workflow.

Returns

Name
Type
Description

<none>

address

moduleProxyAddress Returns the address of the created module proxy.

createModuleProxy

Creates a module proxy instance identified by given metadata.

function createModuleProxy(
    IModule_v1.Metadata memory metadata,
    IOrchestrator_v1 orchestrator,
    IOrchestratorFactory_v1.WorkflowConfig memory workflowConfig
) external returns (address);

Parameters

Name
Type
Description

metadata

IModule_v1.Metadata

The module's metadata.

orchestrator

IOrchestrator_v1

workflowConfig

IOrchestratorFactory_v1.WorkflowConfig

The configData of the workflow.

Returns

Name
Type
Description

<none>

address

Returns the address of the created module proxy.

getBeaconAndId

Returns the {IInverterBeacon_v1} instance registered and the id for given metadata.

function getBeaconAndId(IModule_v1.Metadata memory metadata)
    external
    view
    returns (IInverterBeacon_v1, bytes32);

Parameters

Name
Type
Description

metadata

IModule_v1.Metadata

The module's metadata.

Returns

Name
Type
Description

<none>

IInverterBeacon_v1

<none>

bytes32

id The metadata's id.

getOrchestratorOfProxy

Returns the {Orchestrator_v1} address of a beacon proxy.

function getOrchestratorOfProxy(address proxy)
    external
    view
    returns (address);

Parameters

Name
Type
Description

proxy

address

The beacon proxy address.

Returns

Name
Type
Description

<none>

address

registerMetadata

Registers metadata metadata with {IInverterBeacon_v1} implementation beacon.

Only callable by owner.

function registerMetadata(
    IModule_v1.Metadata memory metadata,
    IInverterBeacon_v1 beacon
) external;

Parameters

Name
Type
Description

metadata

IModule_v1.Metadata

The module's metadata.

beacon

IInverterBeacon_v1

Events

MetadataRegistered

Event emitted when new beacon registered for metadata.

event MetadataRegistered(
    IModule_v1.Metadata metadata, IInverterBeacon_v1 indexed beacon
);

Parameters

Name
Type
Description

metadata

IModule_v1.Metadata

The registered Metadata.

beacon

IInverterBeacon_v1

The registered Beacon.

ModuleCreated

Event emitted when new module created for an {Orchestrator_v1}.

event ModuleCreated(
    address indexed orchestrator,
    address indexed module,
    IModule_v1.Metadata metadata
);

Parameters

Name
Type
Description

orchestrator

address

module

address

The created module instance.

metadata

IModule_v1.Metadata

The registered metadata.

GovernorSet

Event emitted when {Governor_v1} is set.

event GovernorSet(address indexed governor);

Parameters

Name
Type
Description

governor

address

Errors

ModuleFactory__InvalidMetadata

Given metadata invalid.

error ModuleFactory__InvalidMetadata();

ModuleFactory__InvalidInitialRegistrationData

Given metadata invalid.

error ModuleFactory__InvalidInitialRegistrationData();

ModuleFactory__InvalidInverterBeacon

Given beacon invalid.

error ModuleFactory__InvalidInverterBeacon();

ModuleFactory__UnregisteredMetadata

Given metadata unregistered.

error ModuleFactory__UnregisteredMetadata();

ModuleFactory__MetadataAlreadyRegistered

Given metadata already registered.

error ModuleFactory__MetadataAlreadyRegistered();

ModuleFactory__ModuleIsSunset

Given module version is sunset.

error ModuleFactory__ModuleIsSunset();

Last updated