> For the complete documentation index, see [llms.txt](https://docs.ariaprotocol.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ariaprotocol.xyz/technical-docs/contract-docs/iprwa/vault/view/vaultview.md).

# VaultView

**Inherits:** IVaultView

Contains the read-only view/pure functions for the AriaIPRWAVault. This contract reads directly from AriaIPRWAVaultStorage.

## Functions

### getDepositedAmount

Returns the deposited amount of a user for a token

```solidity
function getDepositedAmount(address user, address token) external view override 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 override 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 override 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 override 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 override 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 override 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 override returns (bytes32);
```

### getClaimDeadline

Returns the claim deadline

```solidity
function getClaimDeadline() external view override 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 override 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 override 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 override 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 override 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 override 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 override 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 override 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 override 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 override 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 override 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 override 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 override returns (VaultType);
```

**Returns**

| Name     | Type        | Description                     |
| -------- | ----------- | ------------------------------- |
| `<none>` | `VaultType` | vaultType The type of the vault |
