IModuleFactory_v1.sol

Git Source

Functions

reverter

Returns the address of the {InverterReverter_v1} contract.

function reverter() external view returns (address);

Returns

NameTypeDescription

<none>

address

reverterAddress Returns the address of the {InverterReverter_v1} contract.

governor

Returns the {Governor_v1} contract address.

function governor() external view returns (address);

Returns

NameTypeDescription

<none>

address

govnernorAddress Returns the address of the {Governor_v1} contract.

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

NameTypeDescription

metadata

IModule_v1.Metadata

The module's metadata.

orchestrator

IOrchestrator_v1

The {Orchestrator_v1} instance of the module.

configData

bytes

The configData of the module.

workflowConfig

IOrchestratorFactory_v1.WorkflowConfig

The configData of the workflow.

Returns

NameTypeDescription

<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

NameTypeDescription

metadata

IModule_v1.Metadata

The module's metadata.

orchestrator

IOrchestrator_v1

The {Orchestrator_v1} instance of the module.

workflowConfig

IOrchestratorFactory_v1.WorkflowConfig

The configData of the workflow.

Returns

NameTypeDescription

<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

NameTypeDescription

metadata

IModule_v1.Metadata

The module's metadata.

Returns

NameTypeDescription

<none>

IInverterBeacon_v1

beacon The module's {IInverterBeacon_v1} instance registered.

<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

NameTypeDescription

proxy

address

The beacon proxy address.

Returns

NameTypeDescription

<none>

address

orchestratorAddress The corresponding {Orchestrator_v1} address for the provided proxy.

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

NameTypeDescription

metadata

IModule_v1.Metadata

The module's metadata.

beacon

IInverterBeacon_v1

The module's {IInverterBeacon_v1} instance.

Events

MetadataRegistered

Event emitted when new beacon registered for metadata.

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

Parameters

NameTypeDescription

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

NameTypeDescription

orchestrator

address

The corresponding {Orchestrator_v1}.

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

NameTypeDescription

governor

address

The address of the {Governor_v1}.

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