Skip to main content

PluginSetupProcessorHelpers

public struct PluginSetupRef

struct PluginSetupRef {
struct PluginRepo.Tag versionTag;
contract PluginRepo pluginSetupRepo;
}

enum PreparationType

enum PreparationType {
None,
Installation,
Update,
Uninstallation
}

internal function _getPluginInstallationId

Returns an ID for plugin installation by hashing the DAO and plugin address.

function _getPluginInstallationId(address _dao, address _plugin) internal pure returns (bytes32)
InputTypeDescription
_daoaddressThe address of the DAO conducting the setup.
_pluginaddressThe plugin address.

internal function _getPreparedSetupId

Returns an ID for prepared setup obtained from hashing characterizing elements.

function _getPreparedSetupId(struct PluginSetupRef _pluginSetupRef, bytes32 _permissionsHash, bytes32 _helpersHash, bytes _data, enum PreparationType _preparationType) internal pure returns (bytes32)
InputTypeDescription
_pluginSetupRefstruct PluginSetupRefThe reference of the plugin setup containing plugin setup repo and version tag.
_permissionsHashbytes32The hash of the permission operations requested by the setup.
_helpersHashbytes32The hash of the helper contract addresses.
_databytesThe bytes-encoded initialize data for the upgrade that is returned by prepareUpdate.
_preparationTypeenum PreparationTypeThe type of preparation the plugin is currently undergoing. Without this, it is possible to call applyUpdate even after applyInstallation is called.
Output
0bytes32The prepared setup id.

internal function _getAppliedSetupId

Returns an identifier for applied installations.

function _getAppliedSetupId(struct PluginSetupRef _pluginSetupRef, bytes32 _helpersHash) internal pure returns (bytes32)
InputTypeDescription
_pluginSetupRefstruct PluginSetupRefThe reference of the plugin setup containing plugin setup repo and version tag.
_helpersHashbytes32The hash of the helper contract addresses.
Output
0bytes32The applied setup id.

internal function hashHelpers

Returns a hash of an array of helper addresses (contracts or EOAs).

function hashHelpers(address[] _helpers) internal pure returns (bytes32)
InputTypeDescription
_helpersaddress[]The array of helper addresses (contracts or EOAs) to be hashed.

internal function hashPermissions

Returns a hash of an array of multi-targeted permission operations.

function hashPermissions(struct PermissionLib.MultiTargetPermission[] _permissions) internal pure returns (bytes32)
InputTypeDescription
_permissionsstruct PermissionLib.MultiTargetPermission[]The array of of multi-targeted permission operations.
Output
0bytes32The hash of the array of permission operations.
© 2024