> For the complete documentation index, see [llms.txt](https://legacy-docs.aragon.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legacy-docs.aragon.org/developers/tools/aragonos/smart-contract-references/factory/apmregistryfactory.md).

# APMRegistryFactory

## contract APMRegistryFactory

is [APMInternalAppNames](/developers/tools/aragonos/smart-contract-references/apm/apminternalappnames.md)

Source: [contracts/factory/APMRegistryFactory.sol](https://github.com/aragon/aragonOS/blob/v4.4.0/contracts/factory/APMRegistryFactory.sol)

## Index

* [DeployAPM](#deployapm)
* [b](#b)
* [configureAPMPermissions](#configureapmpermissions)
* [fallback](#fallback)
* [newAPM](#newapm)

## Reference

### Events

#### **DeployAPM** <a href="#deployapm" id="deployapm"></a>

` event`` `` `**`DeployAPM`**`(bytes32 node, address apm)`

***

Parameters:

* `node` - bytes32
* `apm` - address

### Functions

#### **b** <a href="#b" id="b"></a>

` function`` `` `**`b`**`(string x) internal pure returns (bytes)`

***

Parameters:

* `x` - string

Returns:

* bytes

#### **configureAPMPermissions** <a href="#configureapmpermissions" id="configureapmpermissions"></a>

` function`` `` `**`configureAPMPermissions`**`(ACL _acl, APMRegistry _apm, address _root) internal`

***

Parameters:

* `_acl` - ACL
* `_apm` - APMRegistry
* `_root` - address

#### **fallback** <a href="#fallback" id="fallback"></a>

`function (DAOFactory _daoFactory, APMRegistry _registryBase, Repo _repoBase, ENSSubdomainRegistrar _ensSubBase, ENS _ens, ENSFactory _ensFactory) public`

***

Requires either a given ENS registrar or ENSFactory (used for generating a new ENS in test environments)., Create a new factory for deploying Aragon Package Managers (aragonPM).

Parameters:

* `_daoFactory` - Base factory for deploying DAOs
* `_registryBase` - APMRegistry base contract location
* `_repoBase` - Repo base contract location
* `_ensSubBase` - ENSSubdomainRegistrar base contract location
* `_ens` - ENS instance
* `_ensFactory` - ENSFactory (used to generated a new ENS if no ENS is given)

#### **newAPM** <a href="#newapm" id="newapm"></a>

` function`` `` `**`newAPM`**`(bytes32 _tld, bytes32 _label, address _root) public returns (APMRegistry)`

***

Create a new Aragon Package Manager (aragonPM) DAO, holding the \`\_label\` subdomain from parent \`\_tld\` and controlled by \`\_root\`.

Parameters:

* `_tld` - The parent node of the controlled subdomain
* `_label` - The subdomain label
* `_root` - Manager for the new aragonPM DAO

Returns:

* The new aragonPM's APMRegistry app


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://legacy-docs.aragon.org/developers/tools/aragonos/smart-contract-references/factory/apmregistryfactory.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
