# IVaultView

Interface for the read-only functions of the Aria IP Vault

## Functions

### getDepositedAmount

Returns the deposited amount of a user for a token

```solidity
function getDepositedAmount(address user, address token) external view returns (uint256);
```

**Parameters**

| Name    | Type      | Description              |
| ------- | --------- | ------------------------ |
| `user`  | `address` | The address of the user  |
| `token` | `address` | The address of the token |

**Returns**

| Name     | Type      | Description                                           |
| -------- | --------- | ----------------------------------------------------- |
| `<none>` | `uint256` | amount The deposited amount of the user for the token |

### getExpirationTime

Returns the expiration time of the vault

```solidity
function getExpirationTime() external view returns (uint256);
```

**Returns**

| Name     | Type      | Description                                     |
| -------- | --------- | ----------------------------------------------- |
| `<none>` | `uint256` | expirationTime The expiration time of the vault |

### getFundReceiver

Returns the address of the fund receiver

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

**Returns**

| Name     | Type      | Description                                   |
| -------- | --------- | --------------------------------------------- |
| `<none>` | `address` | fundReceiver The address of the fund receiver |

### getTotalDeposited

Returns the total deposited amount of a token

```solidity
function getTotalDeposited(address token) external view returns (uint256);
```

**Parameters**

| Name    | Type      | Description              |
| ------- | --------- | ------------------------ |
| `token` | `address` | The address of the token |

**Returns**

| Name     | Type      | Description                                            |
| -------- | --------- | ------------------------------------------------------ |
| `<none>` | `uint256` | totalDeposited The total deposited amount of the token |

### getUsdcContractAddress

Returns the address of the USDC contract

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

**Returns**

| Name     | Type      | Description                                          |
| -------- | --------- | ---------------------------------------------------- |
| `<none>` | `address` | usdcContractAddress The address of the USDC contract |

### getState

Returns the state of the vault

```solidity
function getState() external view returns (FundraiseState);
```

**Returns**

| Name     | Type             | Description                  |
| -------- | ---------------- | ---------------------------- |
| `<none>` | `FundraiseState` | state The state of the vault |

### merkleRoot

Returns the current Merkle root.

```solidity
function merkleRoot() external view returns (bytes32);
```

### getClaimDeadline

Returns the claim deadline

```solidity
function getClaimDeadline() external view returns (uint256);
```

**Returns**

| Name     | Type      | Description                      |
| -------- | --------- | -------------------------------- |
| `<none>` | `uint256` | claimDeadline The claim deadline |

### getFractionalTokenReceiver

Returns the address of the fractional token receiver - usually staking contract, to collect royalties and distributed to stakers.

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

**Returns**

| Name     | Type      | Description                                                          |
| -------- | --------- | -------------------------------------------------------------------- |
| `<none>` | `address` | fractionalTokenReceiver The address of the fractional token receiver |

### getFractionalToken

Returns the address of the fractional token (0 if not fractionalized)

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

**Returns**

| Name     | Type      | Description                                         |
| -------- | --------- | --------------------------------------------------- |
| `<none>` | `address` | fractionalToken The address of the fractional token |

### getFractionalTokenClaimed

```solidity
function getFractionalTokenClaimed(address usdc, address user) external view returns (bool);
```

**Parameters**

| Name   | Type      | Description                      |
| ------ | --------- | -------------------------------- |
| `usdc` | `address` | The address of the USDC contract |
| `user` | `address` | The address of the user          |

**Returns**

| Name     | Type   | Description                                                                 |
| -------- | ------ | --------------------------------------------------------------------------- |
| `<none>` | `bool` | claimed Whether the fractional token has been claimed for `user` for `usdc` |

### getFractionalTokenClaimedWhitelist

*For whitelist, there is a workaround. Always use `_USDC_WHITELIST` as `usdc` as users have not deposited USDC.*

```solidity
function getFractionalTokenClaimedWhitelist(address user) external view returns (bool);
```

**Parameters**

| Name   | Type      | Description             |
| ------ | --------- | ----------------------- |
| `user` | `address` | The address of the user |

**Returns**

| Name     | Type   | Description                                                                    |
| -------- | ------ | ------------------------------------------------------------------------------ |
| `<none>` | `bool` | claimed Whether the fractional token has been claimed for `user` for whitelist |

### getFractionalTokenName

Returns the name of the fractional token

```solidity
function getFractionalTokenName() external view returns (string memory);
```

**Returns**

| Name     | Type     | Description                                          |
| -------- | -------- | ---------------------------------------------------- |
| `<none>` | `string` | fractionalTokenName The name of the fractional token |

### getFractionalTokenSymbol

Returns the symbol of the fractional token

```solidity
function getFractionalTokenSymbol() external view returns (string memory);
```

**Returns**

| Name     | Type     | Description                                              |
| -------- | -------- | -------------------------------------------------------- |
| `<none>` | `string` | fractionalTokenSymbol The symbol of the fractional token |

### getIpId

Returns the ID of the IP (0 if not registered)

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

**Returns**

| Name     | Type      | Description           |
| -------- | --------- | --------------------- |
| `<none>` | `address` | ipId The ID of the IP |

### getLegal

Returns the address of the legal contract

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

**Returns**

| Name     | Type      | Description                             |
| -------- | --------- | --------------------------------------- |
| `<none>` | `address` | legal The address of the legal contract |

### getStoryAddrs

Returns the story addresses

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

**Returns**

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

### getTimelockData

Returns the timelock data for the fractional token mint

```solidity
function getTimelockData() external view returns (AriaIPRWAVaultStorage.MintTimelock memory);
```

**Returns**

| Name     | Type                                 | Description                                                  |
| -------- | ------------------------------------ | ------------------------------------------------------------ |
| `<none>` | `AriaIPRWAVaultStorage.MintTimelock` | timelockData The timelock data for the fractional token mint |

### getTotalSupplyOfFractionalToken

Returns the total supply of the fractional token

```solidity
function getTotalSupplyOfFractionalToken() external view returns (uint256);
```

**Returns**

| Name     | Type      | Description                                                           |
| -------- | --------- | --------------------------------------------------------------------- |
| `<none>` | `uint256` | totalSupplyOfFractionalToken The total supply of the fractional token |

### getVaultType

Returns the type of the vault

```solidity
function getVaultType() external view returns (VaultType);
```

**Returns**

| Name     | Type        | Description                     |
| -------- | ----------- | ------------------------------- |
| `<none>` | `VaultType` | vaultType The type of the 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/view/ivaultview.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.
