# AriaIPRWAVaultStorage

Library defining the storage layout for AriaIPRWAVault

## State Variables

### \_USDC\_WHITELIST

```solidity
address internal constant _USDC_WHITELIST = address(0x1111);
```

### \_VAULT\_STORAGE\_LOCATION

```solidity
bytes32 internal constant _VAULT_STORAGE_LOCATION = 0xe7b1abf471f6912a1af2d62d0d4c101e77095c0310eb81a682a961d537170900;
```

## Functions

### load

*Returns the storage struct of AriaIPRWAVault.*

```solidity
function load() internal pure returns (VaultLayout storage $);
```

## Structs

### FractionalTokenDetails

*Storage strXuct for fractional token details to be used.*

```solidity
struct FractionalTokenDetails {
    string fractionalTokenName;
    string fractionalTokenSymbol;
    uint104 fractionalTokenTotalSupply;
}
```

**Properties**

| Name                         | Type      | Description                              |
| ---------------------------- | --------- | ---------------------------------------- |
| `fractionalTokenName`        | `string`  | The name of the fractional token         |
| `fractionalTokenSymbol`      | `string`  | The symbol of the fractional token       |
| `fractionalTokenTotalSupply` | `uint104` | The total supply of the fractional token |

### MintTimelock

*Storage structure for admin fractional token mint timelock.*

```solidity
struct MintTimelock {
    uint256 pendingAmount;
    address pendingRecipient;
    uint48 mintExec;
    uint48 timelockDuration;
    uint48 pendingTimelockDuration;
    uint48 timelockDurationExec;
}
```

**Properties**

| Name                      | Type      | Description                                                                                                               |
| ------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- |
| `pendingAmount`           | `uint256` | The amount of fractional tokens pending for mint.                                                                         |
| `pendingRecipient`        | `address` | The recipient address for the pending mint.                                                                               |
| `mintExec`                | `uint48`  | The Unix timestamp when the admin mint becomes executable.                                                                |
| `timelockDuration`        | `uint48`  | The timelock duration to wait for every new admin mint - will never be zero (checked in contract initializer and setter). |
| `pendingTimelockDuration` | `uint48`  | The new timelock duration to be used for the mint.                                                                        |
| `timelockDurationExec`    | `uint48`  | The Unix timestamp when the new timelock duration can be applied.                                                         |

### VaultLayout

*Storage structure for the AriaIPRWAVault*

```solidity
struct VaultLayout {
    StoryAddrs storyAddrs;
    FractionalTokenDetails tokenDetails;
    VaultType vaultType;
    address ipId;
    address fractionalToken;
    address fractionalTokenReceiver;
    mapping(address usdc => mapping(address user => bool claimed)) fractionalTokenClaimed;
    MintTimelock timelock;
    uint256 claimDeadline;
    address legal;
}
```

**Properties**

| Name                      | Type                                                             | Description                                                                                                                                                                           |
| ------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `storyAddrs`              | `StoryAddrs`                                                     | The addresses of the Story Protocol's contracts                                                                                                                                       |
| `tokenDetails`            | `FractionalTokenDetails`                                         | The details of the fractional token                                                                                                                                                   |
| `vaultType`               | `VaultType`                                                      | The type of the vault either Fundraise or Whitelist. Only a single type can be used at a time. Can not be updated once set.                                                           |
| `ipId`                    | `address`                                                        | The ID of the IP                                                                                                                                                                      |
| `fractionalToken`         | `address`                                                        | The address of deployed fractional token                                                                                                                                              |
| `fractionalTokenReceiver` | `address`                                                        | The address of fractional token receiver - usually staking contract, to collect royalties and distributed to stakers.                                                                 |
| `fractionalTokenClaimed`  | `mapping(address usdc => mapping(address user => bool claimed))` | The flag to check if the user has claimed the fractional token for a given USDC address. In whitelist, there is a workaround with \_USDC\_WHITELIST as users have not deposited USDC. |
| `timelock`                | `MintTimelock`                                                   | State for the admin's fractional token mint timelock.                                                                                                                                 |
| `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.                                                                                                                  |


---

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