ModuleFactory_v1.sol
Last updated
Last updated
Inherits: , , ,
Author: Inverter Network
Enables the creation and registration of Inverter Modules, facilitating the deployment of module instances linked to specific beacons. Allows for configuration of modules starting state via provided deployment data.
An owned factory for deploying modules. The owner can register module metadata's to an implementations. Note that a metadata's registered implementation can not be changed after registration!
Returns the address of the contract.
Returns the contract address.
Mapping of metadata identifier to instance.
_MetadataLib.identifier(metadata) =>
Mapping of proxy address to orchestrator address.
Maps a users address to a nonce used for the create2-based deployment.
Storage gap for future upgrades.
Modifier to guarantee function is only callable with valid metadata.
The factories initializer function.
Parameters
_reverter
address
_trustedForwarder
address
The address of the trusted forwarder contract.
The factories initializer function.
Parameters
_governor
address
initialMetadataRegistration
IModule_v1.Metadata[]
List of metadata that will be registered during the initialization.
initialBeaconRegistration
IInverterBeacon_v1[]
Creates a module instance identified by given metadata
and initiates it.
Parameters
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
<none>
address
moduleProxyAddress Returns the address of the created module proxy.
Creates a module proxy instance identified by given metadata
.
Parameters
metadata
IModule_v1.Metadata
The module's metadata.
orchestrator
IOrchestrator_v1
workflowConfig
IOrchestratorFactory_v1.WorkflowConfig
The configData of the workflow.
Returns
<none>
address
Returns the address of the created module proxy.
Parameters
metadata
IModule_v1.Metadata
The module's metadata.
Returns
<none>
IInverterBeacon_v1
<none>
bytes32
id The metadata's id.
Parameters
proxy
address
The beacon proxy address.
Returns
<none>
address
Only callable by owner.
Parameters
metadata
IModule_v1.Metadata
The module's metadata.
beacon
IInverterBeacon_v1
Internal function to register metadata.
Parameters
metadata
IModule_v1.Metadata
The metadata to register.
beacon
IInverterBeacon_v1
Internal function to generate a salt for the create2-based deployment flow. This salt is the hash of (msgSender, nonce), where the nonce is an increasing number for each user.
Needs to be overridden, because they are imported via the Ownable2Step as well.
Needs to be overridden, because they are imported via the Ownable2Step as well.
moduleProxy => .
See .
Modifier to guarantee function is only callable with valid instance and if the owner of the beacon. is same as the of this contract.
The address of the contract.
The address of the contract.
The instance of the module.
The instance of the module.
Returns the instance registered and the id
for given metadata
.
beacon The module's instance registered.
Returns the address of a beacon proxy.
orchestratorAddress The corresponding address for the provided proxy.
Registers metadata metadata
with implementation beacon
.
The module's instance.
The to register the metadata to.