# Content Storage

> <mark style="color:blue;">**EVENT**</mark>
>
> AssetsAdded(parent, tokenIds, assets)

| AssetsAdded(address parent, uint256\[] tokenIds, LibAsset.CreateData\[] assets)         |
| --------------------------------------------------------------------------------------- |
| Event emitted when <mark style="color:blue;">`addAssetBatch`</mark> function is called. |

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> assetCounter()
>
> supply(\_tokenId)
>
> maxSupply(\_tokenId)
>
> uri(\_tokenId, \_version)
>
> hiddenUri(\_tokenId, \_version)
>
> getContractRoyalty()
>
> getRoyalty(\_tokenId)
>
> getLatestUriVersion(\_tokenId, \_isPublic)
>
> updateSupply(\_tokenI&#x64;*,* \_supply)
>
> addAssetBatch(\_assets)
>
> setHiddenUriBatch(\_assets)
>
> setPublicUriBatch(\_assets)
>
> setContractRoyalty(\_receive&#x72;*,* \_rate)
>
> setTokenRoyaltiesBatch(\_assets)

| assetCounter() -> uint256                                      |
| -------------------------------------------------------------- |
| Returns the total number of token types added to the contract. |

| maxSupply(uint256 \_tokenId) -> uint256                                           |
| --------------------------------------------------------------------------------- |
| Returns the maximum amount of token type `_tokenId` allowed to be in circulation. |
| visibility: external                                                              |
| state mutability: view                                                            |

| uri(uint256 \_tokenId, uint256 \_version) -> string                                 |
| ----------------------------------------------------------------------------------- |
| Returns the version of public uri of token type `_tokenId` specified by `_version`. |
| visibility: external                                                                |
| state mutability: view                                                              |

| hiddenUri(uint256 tokenId, uint256 version) -> string                                |
| ------------------------------------------------------------------------------------ |
| Returns the version of private uri of token type `_tokenId` specified by `_version`. |
| visibility: external                                                                 |
| state mutability: view                                                               |

| getContractRoyalty() -> address, uint24                                          |
| -------------------------------------------------------------------------------- |
| Returns the default royalty receiver address and rate for the contract's assets. |
| visibility: external                                                             |
| state mutability: view                                                           |

| getRoyalty(\_tokenId) -> address, uint24                                   |
| -------------------------------------------------------------------------- |
| Returns the royalty receiver and rate for the given token type `_tokenId`. |
| visibility: external                                                       |
| state mutability: view                                                     |

| getLatestUriVersion(uint256 \_tokenId, bool \_isPublic) -> string                            |
| -------------------------------------------------------------------------------------------- |
| Returns the latest public or private uri designated by `isPublic`, of token type `_tokenId`. |
| visibility: external                                                                         |
| state mutability: view                                                                       |

| updateSupply(uint256 \_tokenId, uint256 \_supply)               |
| --------------------------------------------------------------- |
| Updates the total supply of token type `_tokenId` by `_supply`. |
| visibility: external                                            |
| state mutability:                                               |

| addAssetBatch(LibAsset.CreateData\[] \_asset)                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------- |
| Adds a batch of tokens and sets their supply and uri information.                                                                                 |
| `_asset` is an array of CreateData structure objects. See [LibAsset.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/libasset). |
| Emits an `AssetsAdded` event.                                                                                                                     |
| visibility: external                                                                                                                              |
| state mutability:                                                                                                                                 |

| setHiddenUriBatch(LibAsset.AssetUri\[] \_assets)                                                                                                |
| ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Adds a new version of private uri to a batch of tokens.                                                                                         |
| `_asset` is an array of AssetUri structure objects. See [LibAsset.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/libasset). |
| visibility: external                                                                                                                            |
| state mutability:                                                                                                                               |

| setPublicUriBatch(LibAsset.AssetUri\[] \_assets)                                                                                                |
| ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Adds a new version of public uri to a batch of tokens.                                                                                          |
| `_asset` is an array of AssetUri structure objects. See [LibAsset.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/libasset). |
| visibility: external                                                                                                                            |
| state mutability:                                                                                                                               |

| setContractRoyalty(address \_receiver, uint24 \_rate)                                      |
| ------------------------------------------------------------------------------------------ |
| Sets `_receiver` as the default royalty receiver and `_rate` as the default token royalty. |
| visibility: external                                                                       |
| state mutability:                                                                          |

| setTokenRoyaltiesBatch(LibAsset.AssetRoyalties\[] \_assets)                                                                                           |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Sets new token royalty information to a batch of tokens.                                                                                              |
| `_asset` is an array of AssetRoyalties structure objects. See [LibAsset.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/libasset). |
| visibility: external                                                                                                                                  |
| state mutability:                                                                                                                                     |


---

# 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.rawrshak.io/developers/smart-contracts/content-contracts/content-storage.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.
