# IAriaIPRWAVaultFactory

Interface for the AriaIPRWAVaultFactory contract

## Functions

### initialize

Initializes the factory

```solidity
function initialize(StoryAddrs memory storyAddrs, address admin_, address vaultTemplate_) external;
```

**Parameters**

| Name             | Type         | Description                     |
| ---------------- | ------------ | ------------------------------- |
| `storyAddrs`     | `StoryAddrs` | The story addresses             |
| `admin_`         | `address`    | The address of the admin        |
| `vaultTemplate_` | `address`    | The address of `AriaIPRWAVault` |

### deployFundraiseIpVault

Deploys a new fundraise IP vault

*zero address checks skipped: they are checked in the AriaIPRWAVault initializer*

```solidity
function deployFundraiseIpVault(
    address admin,
    AriaIPRWAVaultStorage.FractionalTokenDetails memory tokenDetails,
    VaultFundraiseStorage.Setup memory fundraiseSetup,
    uint48 withdrawalTimelockDuration,
    uint256 claimDeadline,
    address legal
) external returns (address ipVault);
```

**Parameters**

| Name                         | Type                                           | Description                                                                |
| ---------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------- |
| `admin`                      | `address`                                      | The address of the admin                                                   |
| `tokenDetails`               | `AriaIPRWAVaultStorage.FractionalTokenDetails` | The details of the fractional token                                        |
| `fundraiseSetup`             | `VaultFundraiseStorage.Setup`                  | The setup of the fundraise                                                 |
| `withdrawalTimelockDuration` | `uint48`                                       | The timelock duration (in seconds) for admin fractional token withdrawals. |
| `claimDeadline`              | `uint256`                                      | The deadline for the users to claim the fractional token.                  |
| `legal`                      | `address`                                      | The address of the legal contract that checks blacklist and license.       |

**Returns**

| Name      | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `ipVault` | `address` | The address of the deployed IP Vault |

### deployWhitelistIpVault

Deploys a new whitelist IP vault

*zero address checks skipped: they are checked in the AriaIPRWAVault initializer*

```solidity
function deployWhitelistIpVault(
    address admin,
    AriaIPRWAVaultStorage.FractionalTokenDetails memory tokenDetails,
    bytes32 merkleRoot,
    uint48 withdrawalTimelockDuration,
    uint256 claimDeadline,
    address legal
) external returns (address ipVault);
```

**Parameters**

| Name                         | Type                                           | Description                                                                |
| ---------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------- |
| `admin`                      | `address`                                      | The address of the admin                                                   |
| `tokenDetails`               | `AriaIPRWAVaultStorage.FractionalTokenDetails` | The details of the fractional token                                        |
| `merkleRoot`                 | `bytes32`                                      | The merkle root of the whitelist                                           |
| `withdrawalTimelockDuration` | `uint48`                                       | The timelock duration (in seconds) for admin fractional token withdrawals. |
| `claimDeadline`              | `uint256`                                      | The deadline for the users to claim the fractional token.                  |
| `legal`                      | `address`                                      | The address of the legal contract that checks blacklist and license.       |

**Returns**

| Name      | Type      | Description                          |
| --------- | --------- | ------------------------------------ |
| `ipVault` | `address` | The address of the deployed IP Vault |

### setVaultTemplate

Sets the vault template

```solidity
function setVaultTemplate(address newVault) external;
```

**Parameters**

| Name       | Type      | Description                           |
| ---------- | --------- | ------------------------------------- |
| `newVault` | `address` | The address of the new vault template |

### isAdmin

```solidity
function isAdmin(address account) external view returns (bool);
```

**Returns**

| Name     | Type   | Description                     |
| -------- | ------ | ------------------------------- |
| `<none>` | `bool` | True if the caller is the admin |

### getStoryAddrs

Returns the story addresses

```solidity
function getStoryAddrs() external view returns (StoryAddrs memory);
```

**Returns**

| Name     | Type         | Description                    |
| -------- | ------------ | ------------------------------ |
| `<none>` | `StoryAddrs` | storyAddrs The story addresses |

### getVaultTemplate

Returns the address of the vault template

```solidity
function getVaultTemplate() external view returns (address);
```

**Returns**

| Name     | Type      | Description                                     |
| -------- | --------- | ----------------------------------------------- |
| `<none>` | `address` | vaultTemplate The address of the vault template |

## Events

### FundraiseIpVaultDeployed

Emitted when a new fundraise IP vault is deployed

```solidity
event FundraiseIpVaultDeployed(address indexed ipVault);
```

**Parameters**

| Name      | Type      | Description                     |
| --------- | --------- | ------------------------------- |
| `ipVault` | `address` | The address of the new IP vault |

### WhitelistIpVaultDeployed

Emitted when a new whitelist IP vault is deployed

```solidity
event WhitelistIpVaultDeployed(address indexed ipVault);
```

**Parameters**

| Name      | Type      | Description                     |
| --------- | --------- | ------------------------------- |
| `ipVault` | `address` | The address of the new IP vault |


---

# Agent Instructions: 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:

```
GET https://docs.ariaprotocol.xyz/technical-docs/contract-docs/iprwa/vault/factory/iariaiprwavaultfactory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
