# AriaIPRWAVault

**Inherits:** UUPSUpgradeable, IAriaIPRWAVault, ERC721Holder, VaultAdmin, VaultFundraise, VaultView, Whitelist

Main contract orchestrating vault logic by inheriting fundraise, admin, and view functionalities. Directly implements fractional token claim function.

## Functions

### constructor

**Note:** oz-upgrades-unsafe-allow: constructor

```solidity
constructor();
```

### claimFractionalTokens

Caller claims the fractionalized IP tokens from fundraise, only when the vault is Closed.

```solidity
function claimFractionalTokens(address usdc)
    external
    override
    nonReentrant
    whenNotPaused
    returns (address fractionalToken, uint256 amountClaimed);
```

**Parameters**

| Name   | Type      | Description                                                                                                                                                           |
| ------ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `usdc` | `address` | The USDC address used to deposit funds into the fundraise. As it can change over the fundraise lifetime, it is required to specify the USDC address used for deposit. |

**Returns**

| Name              | Type      | Description                                |
| ----------------- | --------- | ------------------------------------------ |
| `fractionalToken` | `address` | The address of the fractional token        |
| `amountClaimed`   | `uint256` | The amount of the fractional token claimed |

### claimFractionalTokens

Caller claims the fractionalized IP tokens from fundraise, only when the vault is Closed.

```solidity
function claimFractionalTokens(bytes32[] calldata _proof, uint256 _amount)
    external
    override
    nonReentrant
    whenNotPaused
    returns (address fractionalToken, uint256 amountClaimed);
```

**Parameters**

| Name      | Type        | Description |
| --------- | ----------- | ----------- |
| `_proof`  | `bytes32[]` |             |
| `_amount` | `uint256`   |             |

**Returns**

| Name              | Type      | Description                                |
| ----------------- | --------- | ------------------------------------------ |
| `fractionalToken` | `address` | The address of the fractional token        |
| `amountClaimed`   | `uint256` | The amount of the fractional token claimed |

### \_authorizeUpgrade

```solidity
function _authorizeUpgrade(address newImplementation)
    internal
    override
    onlyRole(AccessControlStorage.DEFAULT_ADMIN_ROLE);
```

### \_checkClaim

```solidity
function _checkClaim(AriaIPRWAVaultStorage.VaultLayout storage $, address usdc, address claimer) internal view;
```

### \_checkLegal

```solidity
function _checkLegal(address legal, address claimer) internal view;
```

### \_mintAndEmitEvent

```solidity
function _mintAndEmitEvent(
    AriaIPRWAVaultStorage.VaultLayout storage $,
    address usdc,
    address claimer,
    uint256 amountClaimed
) internal;
```


---

# 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/ariaiprwavault.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.
