IModuleFactory_v1.sol
Functions
reverter
Returns the address of the {InverterReverter_v1} contract.
function reverter() external view returns (address);
Returns
governor
Returns the {Governor_v1} contract address.
function governor() external view returns (address);
Returns
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
metadata
IModule_v1.Metadata
The module's metadata
.
configData
bytes
The configData of the module.
workflowConfig
IOrchestratorFactory_v1.WorkflowConfig
The configData of the workflow.
Returns
<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
metadata
IModule_v1.Metadata
The module's metadata.
workflowConfig
IOrchestratorFactory_v1.WorkflowConfig
The configData of the workflow.
Returns
<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
metadata
IModule_v1.Metadata
The module's metadata.
Returns
<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
proxy
address
The beacon proxy address.
Returns
<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
metadata
IModule_v1.Metadata
The module's metadata.
Events
MetadataRegistered
Event emitted when new beacon registered for metadata.
event MetadataRegistered(
IModule_v1.Metadata metadata, IInverterBeacon_v1 indexed beacon
);
Parameters
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
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
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