Skip to content

PluginRepoFactory ​

Contract · src/framework/plugin/repo/PluginRepoFactory.sol

Explained in: PluginRepo (versioning & publishing), Publish a plugin to a PluginRepo

Author: Aragon X - 2022-2023

Inherits: ERC165, ProtocolVersion

This contract creates PluginRepo proxies and registers them on a PluginRepoRegistry contract.

security-contact: sirt@aragon.org

Constructor ​

constructor ​

solidity
constructor(PluginRepoRegistry _pluginRepoRegistry)

Initializes the addresses of the Aragon plugin registry and PluginRepo base contract to proxy to.

ParameterTypeDescription
_pluginRepoRegistryPluginRepoRegistryThe aragon plugin registry address.

Functions ​

createPluginRepo ​

solidity
function createPluginRepo(
    string _subdomain,
    address _initialOwner
) external returns (PluginRepo)

Selector: 0x49b19d08

Creates a plugin repository proxy pointing to the pluginRepoBase implementation and registers it in the Aragon plugin registry.

ParameterTypeDescription
_subdomainstringThe plugin repository subdomain.
_initialOwneraddressThe plugin maintainer address.
ReturnsTypeDescription
[0]PluginRepo

createPluginRepoWithFirstVersion ​

solidity
function createPluginRepoWithFirstVersion(
    string _subdomain,
    address _pluginSetup,
    address _maintainer,
    bytes _releaseMetadata,
    bytes _buildMetadata
) external returns (PluginRepo pluginRepo)

Selector: 0x7bd3e8ac

Creates and registers a PluginRepo with an ENS subdomain and publishes an initial version 1.1.

Dev: After the creation of the PluginRepo and release of the first version by the factory, ownership is transferred to the _maintainer address.

ParameterTypeDescription
_subdomainstringThe plugin repository subdomain.
_pluginSetupaddressThe plugin factory contract associated with the plugin version.
_maintaineraddressThe maintainer of the plugin repo. This address has permission to update metadata, upgrade the repo logic, and manage the repo permissions.
_releaseMetadatabytesThe release metadata URI.
_buildMetadatabytesThe build metadata URI.
ReturnsTypeDescription
pluginRepoPluginRepo

pluginRepoBase ​

solidity
function pluginRepoBase() external view returns (address)

Selector: 0xd222cb1e

The address of the PluginRepo base contract to proxy to..

pluginRepoRegistry ​

solidity
function pluginRepoRegistry() external view returns (PluginRepoRegistry)

Selector: 0x0b36f03c

The Aragon plugin registry contract.

ReturnsTypeDescription
[0]PluginRepoRegistry

protocolVersion ​

solidity
function protocolVersion() external pure returns (uint8[3])

Selector: 0x2ae9c600

Returns the semantic Aragon OSx protocol version number that the implementing contract is associated with.

Dev: This version number is not to be confused with the release and build numbers found in the Version.Tag struct inside the PluginRepo contract being used to version plugin setup and associated plugin implementation contracts.

ReturnsTypeDescription
[0]uint8[3]Returns the semantic Aragon OSx protocol version number.

supportsInterface ​

solidity
function supportsInterface(bytes4 _interfaceId) external view returns (bool)

Selector: 0x01ffc9a7

Checks if this or the parent contract supports an interface by its ID.

ParameterTypeDescription
_interfaceIdbytes4The ID of the interface.