Blueprint Manager
Functionalities
Enable Blueprint
Function:
enableBlueprint(string memory blueprintName_, address blueprintAddress_, address moduleAddress_)
Purpose: Registers and enables a new blueprint within the module.
Parameters:
blueprintName_
: The name of the blueprint.blueprintAddress_
: The address of the deployed blueprint.moduleAddress_
: The address of the associated module.
Validation:
Ensures that the blueprint address, name, and module address are valid.
Checks that the blueprint is not already registered for the given module.
Event: Emits
BlueprintEnabled
with the blueprint name and address.
Disable Blueprint
Function:
disableBlueprint(string memory blueprintName_, address moduleAddress_)
Purpose: Disables a previously enabled blueprint.
Parameters:
blueprintName_
: The name of the blueprint to be disabled.moduleAddress_
: The address of the associated module.
Validation:
Ensures that the blueprint name is valid.
Checks that the blueprint is currently enabled for the given module.
Event: Emits
BlueprintDisabled
with the blueprint name.
Execute Blueprint Transaction
Function:
executeBlueprintTransaction(string memory blueprintName_, address moduleAddress_, uint256 value_, bytes memory data_, Enum.Operation operation_)
Purpose: Executes arbitrary code on a module.
Parameters:
blueprintName_
: The name of the blueprint.moduleAddress_
: The address of the calling module.value_
: Ether value for the transaction.data_
: Encoded data for the function call.operation_
: Type of call (e.g., call or delegatecall).
Process:
Validates that the blueprint is registered for the given module.
Checks permissions using the
Executor
contract.Executes the transaction via the
Executor
contract.
Events: Depending on success or failure, emits either
ExecuteFromBlueprintSuccess
orExecuteFromBlueprintFailure
with the blueprint name and transaction hash.
Check Blueprint Status
Function:
isBlueprintEnabled(string memory blueprintName_, address moduleAddress_)
Purpose: Checks if a given blueprint is enabled for the specified module.
Parameters:
blueprintName_
: The name of the blueprint.moduleAddress_
: The address of the associated module.
Returns: Boolean value indicating whether the blueprint is enabled.
Get Blueprint Address
Function:
getBlueprintAddress(string memory blueprintName_, address moduleAddress_)
Purpose: Retrieves the address of a deployed blueprint.
Parameters:
blueprintName_
: The name of the blueprint.moduleAddress_
: The address of the associated module.
Returns: Address of the blueprint.
Last updated