# Rawrshak

Rawrshak is a decentralized virtual gaming asset platform that creates frameworks for in-game assets allowing for asset interoperability between unique gaming worlds. With Rawrshak's asset framework, it is possible for players to take acquired in-game items along with them as they jump from game world to game world.&#x20;

For game developers and content creators, this increases asset scalability for easy distribution throughout the metaverse. Game world interoperability increases an asset’s value by unshackling it from the lifespan of its original game world. Integrating with Rawrshak increases a game's playerbase by the entire Rawrshak ecosystem.&#x20;

Rawrshak’s goal is to build an equitable and sustainable global gaming ecosystem. Come join us in our quest to build a decentralized metaverse!

## Getting Started

**Got a few minutes?** Check out a video overview of our product:

{% embed url="<https://youtu.be/tAUJwb-dN1w>" %}

{% hint style="info" %}
**If you just want to keep track of the Rawrshak project, come join us!** Check out the [Community Channels](/rawrshak-platform/community-channels) for more details.
{% endhint %}

### Tutorials:

Please check out the Rawrshak Tutorials and learn more about the platform!

{% content-ref url="/pages/yfyy4KdieJFxrlJSBfHE" %}
[Gamer](/tutorials/gamer)
{% endcontent-ref %}

{% content-ref url="/pages/t9ezDtGQGgWrCE3subbq" %}
[Developer](/tutorials/developer)
{% endcontent-ref %}

{% content-ref url="/pages/cKCnWC9oDun9lFzO5xY3" %}
[Unity Asset Viewer](/tutorials/unity-asset-viewer)
{% endcontent-ref %}

{% content-ref url="/pages/J7wGa6ThGiZzd5eU1Tnj" %}
[Rawrshak Dapp](/tutorials/developer/rawrshak-dapp)
{% endcontent-ref %}


# What is the Rawrshak Platform?

## Rawrshak Platform

The Rawrshak platform consists of an end-to-end solution for game developers targeting desktop, WebGL, and mobile games. The Rawrshak ecosystem tries to provide the crypto gaming ecosystem with important infrastructure that will ease the transition of traditional game developers into decentralized asset ownership.&#x20;

### Goals

The Rawrshak platform has several overall goals that we think is important to the development of the future of Gaming:

* Enable cross-game interoperability for in-game assets
* Provide an efficient gaming marketplace
* Create a network of video game worlds with a shared global playerbase&#x20;
* Provide Web3 tools and libraries for game engines
* Use decentralized infrastructure to provide a permanent platform

The goal is to build a decentralized gaming universe where asset ownership is permanent, uncensorable, and genuine. We want to build a Rawrshak community of avid gamers, dedicated game developers, and talented content creators that can spawn amazing tools and interesting ideas.&#x20;


# Platform Overview

The Rawrshak Platform consists of several projects. Each project plays an important role in helping the gaming ecosystem grow.

## Deployable Smart Contracts

Rawrshak developed easy-to-deploy smart contracts that allow game developers to focus on developing their game. These smart contracts are deployable using our Developer Dapp. The Developer Dapp lets developers deploy in-game assets as NFTs, mint the assets, and sell the assets. Managing asset collections, asset royalties, and marketplace revenue is all done through the Dapp.&#x20;

The ease of smart contract deployment lowers the barrier of entry for game developers and content creators. Using the Rawrshak smart contracts gives developers access to future on-chain gaming mechanisms developed for the Rawrshak ecosystem. The Rawrshak community will also be able to contribute and create on-chain ecosystem projects that take advantage of these gaming building blocks.

## Ecosystem Subgraphs

All assets that are created on the Rawrshak platform are indexed into the public Rawrshak subgraphs. Rawrshak community developers can access these subgraphs and create their own queries for data analysis. Game developers can access and create their own queries using our provided libraries. This allows for easy data querying for game developers, web developers, and other tool developers.

In addition to the content subgraphs, we are also making public the marketplace subgraphs. Anyone is free to access marketplace information and provide interesting gamer and game developer dashboards.

## Gaming Marketplace

Existing marketplaces aren't designed for games. They have high fees and have friction for buying mundane non-unique assets. Not all assets need to be unique nor be required to be bought individually.&#x20;

The Rawrshak marketplace will be optimized for gamers and game-centric actions such as buying items in bulk, instant purchasing, instant selling, orderbook matching, etc. Over time, the marketplace will look for ways to improve based on the gamer community's feedback.

## Public Game Engine SDKs & Tools

Traditional game developers have many hurdles to overcome before they can fully integrate with the decentralized gaming space. One of the major issues is the lack of Web3 tools and libraries for game engines. Most game engine SDKs are still in development and there is little infrastructure. Game developers either have to write their own libraries or they need to wait for the public game engines to adopt.&#x20;

Our goals are to develop these missing pieces and encourage the ecosystem to develop libraries and tools for each other. Rawrshak is working on public game engines that will allow game developers to easily work with the Rawrshak platform.

## Asset Framework and Metadata

In order for decentralized gaming to truly take off, the assets that gamers acquire would ideally have utility beyond the game that they were created from. Despite that, there are many problems to overcome both in the intellectual property rights space and technical implementation space.&#x20;

At this point, Rawrshak is more interested in the technical implementation space because that is going to be the basis of how we will define and modify intellectual property rights in the decentralized world. IP rights are only useful if there is a centralized figure to enforce these rules. It's difficult to adopt in a decentralized global gaming universe.

On the technical side, the pathway to asset interoperability is also an uphill battle. Rawrshak is building an in-game asset framework that gives the developer a common framework for deploying their assets. The Rawrshak standardized metadata will take into account required information for different types of assets. Game developers and content creators will only need to deploy the assets according to these frameworks in order to launch interoperable assets. Games will need to adopt the asset framework in order to load assets that the gamers want to bring in. Rawrshak makes deploying an asset into the metaverse scalable and increases their value.

## Future Projects

The Rawrshak platform is based on the promise of a decentralized gaming universe and asset interoperability. The Rawrshak platform and its community will continue to work on interesting projects for the ecosystem that will increase the ecosystem's value. Rawrshak will support creators and community managers in growing their spaces. Rawrshak will continue developing on-chain gaming mechanics that advance the gaming space in ways people have only yet envisioned.&#x20;

Please stay tuned as we build the gamer paradise we've always dreamed of!


# Rawrshak Ecosystem

## Ecosystem Participants

The Rawrshak ecosystem is going to be filled with many different types of ecosystem stakeholders. The goal is to give the ability to manage the ecosystem to its most passionate community members. At full project decentralization, the Rawrshak development team will only be a participating member and will not hold overreaching governance powers.&#x20;

The Rawrshak platform's success depends on the balance between all of its community participants.

### Gamers

Gamers are the core community members that will boost the ecosystem as far as it will go. They will have the strongest say in the direction of the platform. Their goal is to have fun, acquire interesting assets, and brandish their skills and achievements. Gamers can also help fund community projects and games that they think is interesting! Ideally, gamer participation in the development of the platform becomes the backbone of Rawrshak.

### Game Developers

Game developers are the core creating members of the platform. Their goal is to have the ability to build new worlds and share their creativity with the entire Rawrshak audience. They need the tools to garner attention and remain profitable. Game developers will use the Rawrshak platform to create their own ecosystem, collaborate with other creators, and create community events. Game developer participation in the platform is integral to keeping the ecosystem sustainable.

### Content Creators

Content creators are important because they bring the flare and the boom to the ecosystem. Each content creator has their own reasons for using the Rawrshak platform. Content creators are the pioneers that venture to expand the Rawrshak ecosystem and help differentiate Rawrshak from any other gaming ecosystem out there. Content creator participation in the platform is integral to growing the ecosystem in ways we cannot predict.

### Brand Creators and Community Managers

Brand creators and community managers are those who manage the different growing economies within Rawrshak. Brand creators build a culture through the assets whereas community managers build culture through community events and conferences. They keep the ecosystem organized and help direct resources to where the community thinks it matters most.&#x20;


# Networks

### Supported Networks

* Optimistic Kovan

### Future Networks

* Optimistic Ethereum Mainnet
* Arbitrum Testnet and Mainnet
* Polygon Testnet and Mainnet


# Litepapers

{% hint style="info" %}
**Important:** These papers are still in development and are non-binding. They may change over time and it is up to the development team how it changes before release.
{% endhint %}

## Rawrshak Litepaper

The Rawrshak litepaper discusses the overall vision for the Rawrshak platform. It goes into detail about why Rawrshak was created, who it's for, and how the project is being implemented. It gives insights on the roadmap for Rawrshak.&#x20;

It also discusses future projects in the pipeline for the platform that increases the value of the ecosystem.&#x20;

Here's a [link ](https://github.com/Rawrshak/Rawrshak-Litepaper/blob/main/Rawrshak.v.3.2.pdf)to the Rawrshak litepaper for more details.

## RAWR tokenomics&#x20;

The RAWR token is the governance and utility token that will be used in the ecosystem. The RAWR token will have several uses in the ecosystem including the following:

* Governance voting
* Marketplace fee revenue share
* Gamer community event rewards
* Game developer partnerships
* Content security&#x20;
* Other future Rawrshak project use-cases

Here's a [link ](https://github.com/Rawrshak/Rawrshak-Litepaper/blob/main/RawrshakTokenomics.v.1.5.pdf)to the RAWR tokenomics litepaper for more details.

## Rawrshak Governance

The Rawrshak platform will be governed by the community. At full decentralization, the Rawrshak development team will only be participating developers in the ecosystem.

Holding the RAWR token bestows upon a user the responsibilities of governing the platform. It will also grant the holder the benefit of receiving Rawrshak rewards in the form of NFTs and token emissions.

Here's a [link ](https://github.com/Rawrshak/Rawrshak-Litepaper/blob/main/RawrshakGovernance.v.0.3.pdf)to the Rawrshak Governance litepaper for more details.

Here's a [link ](https://github.com/Rawrshak/Rawrshak-Litepaper/blob/main/RawrshakGovernanceResearch.v.0.1.pdf)to the Governance research materials for more details.


# Community Channels

#### To stay up to date with the latest Rawrshak news and to join our discussions, come check out our communities! You're always welcome to come play with us.&#x20;

### Discord

{% embed url="<https://discord.com/invite/Ge2j4Cd65H>" %}

### Twitter

{% embed url="<https://twitter.com/rawrshak>" %}


# Partnerships & Integrations

## Infrastructure

These are the decentralized infrastructure projects and protocols that we are using in order to completely decentralize our platform. Even though currently our project is not fully decentralized, due to the dependence of our front-end on Squarespace and Github pages, Rawrshak is intended to reach full decentralization both for the technology and the governance.

### [The Graph](#infrastructure)

Rawrshak is deploying public subgraphs that index the information for all projects in the platform. Anyone can use these subgraphs to query the ecosystem for data to build web dashboards or query for in-game information.

### [Arweave](https://arweave.org/)

Rawrshak is depending on Arweave to provide decentralized storage for Rawrshak assets. The Rawrshak assets are meant to be permanent, yet upgradeable. Arweave allows the game developer to pay for their storage once and the Arweave blockchain will store these assets' data permanently.

### [ArDrive](https://ardrive.io/)

ArDrive is an Arweave ecosystem project that helps manage Arweave uploaded files. The ArDrive project implements a file system protocol that makes files uploaded on Arweave significantly easier to use.

### [ChainSafe](https://chainsafe.io/)

ChainSafe is a blockchain research and development firm that is working on decentralized web tools. ChainSafe is developing a Web3 Gaming SDK for Unity that the Rawrshak libraries are building upon. The Rawrshak development team is actively working with ChainSafe to help develop game developer tools and SDKs.

## Developer Partnerships

### [Decent Labs](https://docs.rawrshak.io/rawrshak-platform/www.decentlabs.io)

Decent Labs is a venture studio that helps projects reach an MVP stage. Decent Labs is helping the Rawrshak team develop the decentralized application for gamers and game developers. They are providing assistance and guidance regarding the project development.

### [Virtuix](https://docs.rawrshak.io/rawrshak-platform/www.virtuix.com)

Virtuix is a virtual reality platform that supports the development of Rawrshak.&#x20;


# Gamer


# Setup


# Metamask Wallet

In order to participate in the Rawrshak Alpha, a gamer must have have an Ethereum Wallet capable of connecting to the the Rawrshak front-end.

In this tutorial, we help the user install Metamask on their browser and create a wallet. We also recommend using Metamask mobile wallet in order to log into games through WalletConnect. We recommend using Metamask because it allows the user to change networks from Ethereum Mainnet to Optimism Kovan Testnet. A tutorial for switching networks is [here](/tutorials/gamer/setup/adding-optimism-kovan-network).&#x20;

{% hint style="info" %}
The wallets created in this tutorial are for testing purposes only and not used for anything else.
{% endhint %}

#### Requirements:

* A chrome-based web browser (Google Chrome, Microsoft Edge Chromium, Brave Browser, etc)

#### 1. Install the Metamask browser extension

Go to the chrome web store and search for metamask: [Link](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en)

![Add Metamask to your browser](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F4coaNCnv7xjjSxm28hZd%2Fimage.png?alt=media\&token=0a581243-5fc5-4002-bf21-448a0ebd421d)

#### 2. Generate an Ethereum Wallet or login with your wallet's Secret Recovery Phrase

In this tutorial, we will create a new wallet.

![Create a new wallet or load an existing wallet](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FXsXajPBfTF7Sq4jvefUy%2Fimage.png?alt=media\&token=e0ee942c-ea52-40ed-ad61-b1fa49e98c2c)

#### 3. Create a Password

![Create a password](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FUGB7iYcQyTHmj7kDC5VH%2Fimage.png?alt=media\&token=7339f5df-5863-443f-964e-df74cecb5f01)

#### 4. Save Secret Phrase for recovery

![Save Secret Phrase and finish the wallet creation process](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FLOYqU7za78BvNlDmBJdi%2Fimage.png?alt=media\&token=74c41b40-c6cf-45ed-8b15-5911793a8b81)

#### 5. All Done!

![Wallet Created!](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FifnTAokLBvBhE2kekhti%2Fimage.png?alt=media\&token=b4653ebd-e161-45ce-a8de-fc7919ef06cd)


# Adding Optimism Kovan Network

Optimism Kovan Network is the test network we are going to use for the Rawrshak platform's open Alpha launch.

#### 1. Open the Metamask Wallet

![Metamask Browser Wallet](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fw6qga5O7FgIa1kySUkI8%2Fimage.png?alt=media\&token=fcb58987-ded1-4956-b979-14a79ffe09b6)

#### 2. Open the Accounts and click Settings

![Go to Settings](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FWIds2JaBLh6VooQQZs7B%2Fimage.png?alt=media\&token=61ed7279-ca71-435c-921c-5e0b291ff8c1)

#### 3. Scroll to the "Networks" section

![Select Networks](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FPzv7an6n8FHm8zKF593H%2Fimage.png?alt=media\&token=ac22053a-a5e4-452f-9f72-bf63686de54c)

#### 4. Click the "Add Network" button and fill information

![Click Add Network](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FVzNdwYqebevye4J7NRYq%2Fimage.png?alt=media\&token=481e17ec-03d9-4603-9e70-e1dd9f7e2e92)

This opens up the Metamask Settings. Fill in the Optimism Kovan info and click *Save* to add the network.

<table><thead><tr><th width="225.0234541577825">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Network Name</td><td>Optimism Kovan</td></tr><tr><td>New RPC URL</td><td>https://kovan.optimism.io</td></tr><tr><td>Chain ID</td><td>69</td></tr><tr><td>Block Explorer URL</td><td>https://kovan-optimistic.etherscan.io</td></tr><tr><td>Currency Symbol</td><td>ETH</td></tr></tbody></table>

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FLUsYeXmGTOZDyBcxle3n%2Fimage.png?alt=media\&token=1bd46d6e-3677-490b-ab44-e5aacd4b9086)


# Funding Testnet Wallet

In order to transact on Ethereum and its testnets, a wallet must hold some ETH. In order to get some testnet ETH (and testnet DAI) on the Optimism Kovan Network, we created this tutorial. We will use Paradigm's MultiFaucet in order to load our wallet with testnet ETH and DAI. Paradigm's faucet is great because it sends assets to your wallet on several test networks including Optimism Kovan.

#### **1. Go to the Paradigm MultiFaucet**

**Paradigm MultiFaucet:** [**https://faucet.paradigm.xyz/**](https://faucet.paradigm.xyz/)

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fi6WpTeIlW1XwNktUHilq%2Fimage.png?alt=media\&token=0632f0ec-996f-43ea-ba25-f70d7a00ddca)

#### 2. Sign in with Twitter for Human Verification

Once signed in, you'll be able to enter a valid address.

![After signing in to Twitter](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F3LexgoK7fTl0bOt2V733%2Fimage.png?alt=media\&token=8ff11d8e-ac8f-4c2f-be67-52f5b6461a9b)

#### 3. Copy your public address from the Metamask Wallet created earlier

![Copy Wallet from metamask](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FtHO0ebgiLDyDCbcxN5Jq%2Fimage.png?alt=media\&token=21e4916d-8ee7-46c6-bd58-bd4d145fdaa2)

#### 4. Click "Claim" to receive tokens

![Claim testnet tokens](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FnhWd8f6gkAn8oTOsb6y8%2Fimage.png?alt=media\&token=9f593b7d-e73b-4609-a883-0528f34b2886)

#### 5. Verify Tokens Claim

![Tokens Claim](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FBXBiORj5LokQ5iIsn1y3%2Fimage.png?alt=media\&token=acaa6796-f940-49cc-861d-e211c635295b)

{% hint style="info" %}
Switch to Optimism Kovan by clicking the top right dropdown. If you can't find "Optimism Kovan", please check out the [Adding Optimism Kovan Network tutorial](/tutorials/gamer/setup/adding-optimism-kovan-network).
{% endhint %}

![1 ETH received on Optimism Kovan test network](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F62l7BsfVmKWnxgRXe3Ey%2Fimage.png?alt=media\&token=7d230e31-f00b-45d1-a2a9-de52223ee5ea)

#### 6. \[Optional] Add DAI to the wallet

Go back to the faucet.paradigm.xyz website and scroll down to the Optimistic Kovan section and click "Add to Metamask" next to the DAI contract address.

![Click "Add to Metamask"](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F6oU0RODC3GNheySjSQ53%2Fimage.png?alt=media\&token=de274021-5e18-41c6-8bab-954e0f982eb8)

![Add Token to Metamask](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FpBGdkZ4ayndOKmcLNVEb%2Fimage.png?alt=media\&token=b29d2d8d-a9c5-4129-8120-b0038f8c89b0)

![Verify amount of testnet DAI in the wallet](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FD8iU4yhrRPIUWoqOs51T%2Fimage.png?alt=media\&token=29382e41-ea9e-4525-84e6-4d5791484c66)


# Demo

In this Demo video, we showcase a gamer's workflow as they play and earn assets from games and interact with Rawrshak's marketplace.

{% embed url="<https://youtu.be/TtFp8imp6oA>" %}
Rawrshak Gamer Demo
{% endembed %}


# Developer


# Setup


# Arweave Wallet

An Arweave Wallet is required in order to upload Meta Asset data to Arweave, a decentralized storage solution. The following tutorial will help the developer acquire an Arweave wallet and load it with 0.02 AR tokens.

#### 1. Go to the Arweave Faucet&#x20;

Go to the [Arweave Faucet](https://faucet.arweave.net) and read the instructions. Click *Continue* to proceed.

![Go to faucet.arweave.net](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F6OC2RmYpOOdYjbZnKWgQ%2Fimage.png?alt=media\&token=77e0eb2f-c192-4c8c-81f3-0e987dff6219)

#### 2. Download and save your wallet key file

![Download your newly created Arweave wallet file](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FqeTSPqcnj8yD0ofWeY6T%2Fimage.png?alt=media\&token=37467f67-acdf-4c27-b293-698bde070369)

#### 3. Post the Human Verification tweet

![Post the Human Verification Tweet ](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Ftf4VpDGPgrDqN0o6t1Hn%2Fimage.png?alt=media\&token=17fd527a-cc14-4f61-a5bf-8228a6a069fb)

#### 4. Wait to receive the 0.02 AR tokens

![Wait for the 0.02 AR tokens to be sent to your wallet.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F0c2NpkAMVgmXaY4cPgT1%2Fimage.png?alt=media\&token=6c054fee-a690-4114-90e1-37c132cfd19b)

#### 5. Install ArConnect (Arweave's browser wallet)

Go to the Chrome Web Store to add [ArConnect ](https://chrome.google.com/webstore/detail/arconnect/einnioafmpimabjcddiinlhmijaionap)to your browser.

![Download the ArConnect extension](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FJwWolDCY6ObtQlkxQT8J%2Fimage.png?alt=media\&token=e1e229c6-b495-40f4-8553-67fd1f85f56f)

**6. Create an ArConnect account**

![Create an ArConnect account](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FZNIIsI8oTO92OH8QkxXi%2Fimage.png?alt=media\&token=d10d7229-9bd3-4b12-923b-fb2fa00bf8b7)

#### 7. Load the Arweave Wallet

Select *"Load Wallet(s)"* and load the downloaded Arweave wallet file from step 2.&#x20;

![Click Load Wallet](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FbRGhBLR6SAGTshS9Yl9J%2Fimage.png?alt=media\&token=2fe3da92-16b9-4ed6-8d26-a3755c3625ee)

![Select "Load keyfile(s) from filesystem](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FYzC8upIOcvEYhYmYIjaI%2Fimage.png?alt=media\&token=258b30cc-9704-44ea-82c5-289824d8edb6)

![Load the Wallet](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fc79rxCCMk4s5xhaQIYwf%2Fimage.png?alt=media\&token=32d3eaca-f24e-4d23-adc2-f2d57bf5b5aa)

#### 8. Verify the Arweave Wallet Loaded

The Arweave wallet should now be accessible in the ArConnect extension.

![Arweave Wallet Loaded](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F64yciJ0WcbQnVwD86h8q%2Fimage.png?alt=media\&token=6b9f0447-3c85-47fe-a16c-0849f12ee3a9)

#### Go to the next tutorial to learn how to load the Arweave Wallet to your ArDrive account for easy asset management.


# ArDrive Account

ArDrive is a file system built on Arweave that makes storage simple and easy. ArDrive provides a fantastic user experience for managing uploaded files. We recommend ArDrive for easy management of your Meta Asset's data.

**Assumptions:**

* We assume you've created an Arweave Wallet and installed ArConnect. Please refer to the [Arweave Wallet tutorial](/tutorials/developer/setup/arweave-wallet) if not.

#### 1. Load Arweave Wallet on ArDrive

Go to: [app.ardrive.io](https://app.ardrive.io/#/sign-in)

In this tutorial, we'll be using the ArConnect to create an account.

![Select "Use ArConnect"](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FL9tfRSWsWKAXRmj03bzm%2Fimage.png?alt=media\&token=a8be53cf-8fe4-44c0-8739-ba4be4d10314)

![Log in using ArConnect](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FLNTBlvladWJYIAKRQHhn%2Fimage.png?alt=media\&token=1f918e47-fbf5-4fa4-8eaa-665586ebd551)

![Accept the permissions](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fzy24BcSCMKkg7PLMHEDJ%2Fimage.png?alt=media\&token=91b9fff1-53a4-4957-a97b-58cae993b681)

#### 2. Create an ArDrive account

![Create a new ArDrive account](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F3NqFpYBptqZKpEfhNJRS%2Fimage.png?alt=media\&token=85aed052-8d4f-4fa0-8645-5d27fb383e48)

#### 3. Verify ArDrive account was connected

![Confirm your wallet is logged in with the account](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FAe9G0yespEdNQixL2l8Z%2Fimage.png?alt=media\&token=e9e0c53c-fa0f-4c3a-9d4d-286ca471ca19)

{% hint style="info" %}
Load the Arweave wallet with AR tokens in order to upload and store data.
{% endhint %}


# Pinata

Currently, the Rawrshak (Alpha release) is using IPFS to store the Meta Asset's metadata files. The reason that we are using IPFS instead of Arweave is because TheGraph, as of December 2021, does not yet support reading JSON files from Arweave. Our subgraphs read and process an asset's metadata in order to build a richer data set.&#x20;

We therefore require a Pinata account when creating Content Contracts and Meta Assets in the Developer Dapp. The plan is to eventually store all metadata on Arweave when The Graph <> Arweave integration is released.&#x20;

In the meantime, please use this tutorial to create and use the Pinata account for IPFS.

#### Requirements:

* Email

#### 1. Register for a [Pinata ](https://docs.rawrshak.io/tutorials/developer/setup/www.pinata.cloud)Account

![Go to Pinata: www.pinata.cloud](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FxkUS52bK2r6FzhmeYfSy%2Fimage.png?alt=media\&token=8738b3e4-35ce-4901-93bf-f5c1c2b1db2c)

![Register for Pinata](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FlrXdmiym4LxX72CBMIu1%2Fimage.png?alt=media\&token=ff5f2e6e-d258-47d3-ab8e-2b2fa21475dd)

{% hint style="info" %}
Pinata gives you 1GB free of pinning service which is more than enough for uploading asset metadata at about 200 bytes to 2kb per metadata file.
{% endhint %}

#### 2. Create an API Key

In the profile button on the top right, open the dropdown menu and select *API Keys.*

![API Keys](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FjcqFSVaQQR8SV6rOvJIU%2Fimage.png?alt=media\&token=4f4bdb90-fbf4-417e-b5cb-d0022636915f)

#### 3. Set the API Key Settings and click Create

Set "Admin" to true and set Key Name.

![Set API Key Settings](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FNFMu3EBCuL45Uq7PCCDs%2Fimage.png?alt=media\&token=953c3aed-98c0-4085-9b9b-4db35f13e8f9)

#### 4. Copy newly generated Pinata API Key somewhere safe

![Click "Copy All" and paste the keys somewhere safe.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fe1ficsETLUGy1vNoSJTn%2Fimage.png?alt=media\&token=7a591fd0-02c0-455e-914c-947dfa4f104b)

The **API Key** and **API Secret** will be used in the Rawrshak app. Please keep these items safe. They will not be accessible after you click "Done".

#### 5. \[Optional] Revoking API Key Access

If your API Keys become compromised, you can simply Revoke access to these keys.&#x20;

![Revoking Access](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FVDbYXwCBN5wXdaDQXHEs%2Fimage.png?alt=media\&token=93306ec2-5746-4825-a1a0-a8f46fcee272)

![Revoke Key](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FzLt2ZXr6Uo1nlfTzYp7I%2Fimage.png?alt=media\&token=21d1ba7a-318d-4ccc-86e6-e2b61248610e)

#### Go to the next tutorial to learn how to download and set up Unity.


# Unity

### Installing the Unity Game Engine&#x20;

Download Unity: <https://unity.com/download>

If Unity Hub is already installed, open the *Installs* Tab and click the *Add* button. Select the recommended version of Unity 2020.3+ and select next:

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FliPOwRwPt7UqiM88XBYp%2Fimage.png?alt=media\&token=5f80b07e-348c-4d07-b9c8-a7c13419bd0f)

Add Android, iOS, Universal Windows Platform, and WebGL Build Support:

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FMKgyKEVbhm9q2nVK29gj%2Fimage.png?alt=media\&token=884be5f5-3c72-4bc5-8447-3590be26b56e)

Select *Next and continue.*


# Demo

In this Demo video, we showcase a game developer's workflow as they package Meta Assets, deploy their NFTs and verify it works.

{% embed url="<https://youtu.be/jgZVDqzZmh0>" %}


# Unity


# Loading the Rawrshak Tools

#### 1. Download Unity (version 2020.3.12f1)

Download Unity: <https://unity.com/download>

If Unity Hub is already installed, open the *Installs* Tab and click the *Add* button. Select the recommended version of Unity 2020.3+ and select next:

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FliPOwRwPt7UqiM88XBYp%2Fimage.png?alt=media\&token=5f80b07e-348c-4d07-b9c8-a7c13419bd0f)

Add Android, iOS, Universal Windows Platform, and WebGL Build Support:

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FMKgyKEVbhm9q2nVK29gj%2Fimage.png?alt=media\&token=884be5f5-3c72-4bc5-8447-3590be26b56e)

Select *Next and continue.*

#### 2. Create 3D Project

In the *Project* Tab, click the *New* button (make sure the correct version is set). Select *3D*, add project name, and select *Create*.

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FaD9CPQrWcIjnZVOqp63Y%2Fimage.png?alt=media\&token=ed05d8c7-58a2-45e1-b23f-ed266c991835)

{% hint style="info" %}
Please keep in mind Rawrshak currently only support the Built-in Render Pipeline.
{% endhint %}

#### 3. Install Editor Coroutines

In the Menu bar, open the Package Manager. Select *Window -> Package Manager*

Select the *Unity Registry* from the dropdown, and scroll down to *Editor Coroutines*. Select *Editor Coroutines* and click *Install.*

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FrD34yeyKSJ0H1AcboBo6%2Fimage.png?alt=media\&token=8b303698-c127-4925-93c9-8d3bafb40da6)

#### 4. Download Unity Tools from the github repo (releases)

Rawrshak Tools releases: <https://github.com/Rawrshak/Unity-Tools/releases>

Download the Rawrshak Unity Tools Unity Package.

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F8QAm0AyLwln7TJa9FXh6%2Fimage.png?alt=media\&token=7811908b-9f85-4415-9547-b3feeedd818b)

#### 5. Drag and drop the Unity Tools package into the project

Open the folder where you downloaded the Unity Package.&#x20;

Drag and drop the package in the Unity package in the Unity Window.

![Drop Package here.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FSTseYbTtU1QcqfcitbmO%2Fimage.png?alt=media\&token=d4611bb0-f786-4047-9ed1-a8af7aaedfa4)

Select "All" and click "Import".

![Select "All" and click "Import"](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FXEDjRUOoGT4nwfNFuJTR%2Fimage.png?alt=media\&token=97fb3846-8d4a-49f5-b0c5-226fac7c1621)

#### 6. Finished!


# Loading the Rawrshak SDK

#### 1. Download Unity (version 2020.3.12f1)

Download Unity: <https://unity.com/download>

If Unity Hub is already installed, open the *Installs* Tab and click the *Add* button. Select the recommended version of Unity 2020.3+ or whichever version the developer needs.&#x20;

{% hint style="info" %}
Rawrshak is only supported on 2020.3+ Unity versions.&#x20;
{% endhint %}

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FliPOwRwPt7UqiM88XBYp%2Fimage.png?alt=media\&token=5f80b07e-348c-4d07-b9c8-a7c13419bd0f)

Select Platform to install.

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FMKgyKEVbhm9q2nVK29gj%2Fimage.png?alt=media\&token=884be5f5-3c72-4bc5-8447-3590be26b56e)

Select *Next and continue.*

#### 2. Create 3D Project

In the *Project* Tab, click the *New* button (make sure the correct version is set). Select *3D*, add project name, and select *Create*.

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FaD9CPQrWcIjnZVOqp63Y%2Fimage.png?alt=media\&token=ed05d8c7-58a2-45e1-b23f-ed266c991835)

{% hint style="info" %}
Please keep in mind Rawrshak currently only support the Built-in Render Pipeline.
{% endhint %}

#### 3. Download Unity SDK from the github repo (releases)

Rawrshak Tools releases: <https://github.com/Rawrshak/Unity-SDK/releases>

Download the Rawrshak Unity SDK Unity Package.

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FAiTeyMZPqWbmZC005XlK%2Fimage.png?alt=media\&token=66905d43-ab6c-41c8-8d52-363f2a535ae8)

{% hint style="warning" %}
The Unity SDK is still in alpha and is subject to change during development. There are currently no stable releases yet. Please download the latest version for the most up to date package.
{% endhint %}

#### 5. Drag and drop the Unity SDK package into the project

Open the folder where you downloaded the Unity Package.&#x20;

Drag and drop the package in the Unity package in the Unity Window.

![Drop Package here.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FSTseYbTtU1QcqfcitbmO%2Fimage.png?alt=media\&token=d4611bb0-f786-4047-9ed1-a8af7aaedfa4)

Select "All" and click "Import".

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FpYEQADOiy1FHPKFj2gqC%2Fimage.png?alt=media\&token=49370f93-c467-4ebc-80c8-e3dd3bde4cf9)

#### 6. Finished!


# 3D Static Object In-game Framework

#### 1. Load Folder containing the asset into the Package Loader Project

![Load Folder containing assets (textures, mesh, materials, etc)](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FT6RxJla9Z6VbrjoPQtnG%2Fimage.png?alt=media\&token=3f9f46f9-54cb-4636-8b59-e4c825f68a31)

{% hint style="info" %}
Developer may import .obj files, .fbx file, or 3d software package file that is supported by Unity.
{% endhint %}

#### 1.a Extract the Materials from the prefab (if necessary)

If you select the 3D Object file, (in this case, a .OBJ file), some materials may need to be remapped.&#x20;

In this case, in the inspector, open the 'materials' tab and click the "**Extract Materials...**" to extract the materials. It should automatically remap the materials. Although, manual remapping may be necessary.

![Missing Materials](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FwXsMxIKF3sDrArQbf5Ah%2Fimage.png?alt=media\&token=4cdb6ed7-3a7e-4694-8fbc-a6989096353b)

![After clicking the "Extract Materials"](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FhPFnd6nZRScMvW3DSa9V%2Fimage.png?alt=media\&token=6974bb36-9e30-4bcf-940f-7b8785e3ce5f)

![Extracted Materials and remapped to the mesh](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FL5TSjNuf0FyU5uVBfpsn%2Fimage.png?alt=media\&token=c73ee10f-629a-46b1-b267-f25aa64dac3e)

#### 2. Drag the 3D Asset into the Scene, set orientation and position

Make sure the asset is facing the +Z axis and is initially positioned at (0,0,0).

![Asset In the scene](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FXLqgY9LZ302MJFM821Ia%2Fimage.png?alt=media\&token=a30486e1-4208-4f5f-a38c-4fd76dc8f118)

#### 3. Select Static 3D Object Verifier Prefab and drag onto the scene

Go to: the Assets\Rawrshak\Tools\Static3dObjectVerfier\Prefabs&#x20;

Select the default asset shape you want for this asset.

In this tutorial, we'll use HorizontalZ prefab.

![HorizontalZ Prefab](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FPRRnCRjAOUUcONbkdaq1%2Fimage.png?alt=media\&token=7ecbfc00-c477-4f8c-ba51-9a39dd2b191f)

The prefabs will vary in scale and shape.&#x20;

Please note the Object Bounds script in the inspector.&#x20;

#### 4. Resize and Orient 3d asset to fit inside the prefab

#### 4.1 Add Box Collider to the model with the Mesh Renderer

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FoetSPEpoKsOEX2TN8sL3%2Fimage.png?alt=media\&token=b5d68b30-ab46-4344-a829-65b6dfa8b520)

Click the object with the mesh renderer to open the inspector. In this case, it's the '*default'* object inside SCI\_FR&#x53;*\_*&#x31;3\_HD game object.&#x20;

Scroll to the bottom of the inspector on the right and click "Add Component". Type "Box Collider" and select the box collider. It should be added to this object as shown in the image above.

The box collider is the green outline shown above.

{% hint style="info" %}
The "Collider" should, as much as possible, be tight to the asset. Feel free to use other colliders or adjust the collider if it seems too big. The model may also have issues if the collider looks is extremely incorrect.&#x20;
{% endhint %}

#### 4.2 Orient and Resize to fit inside the Prefab

Make sure both HorizontalZObjectBounds and SCI\_FRS\_13\_HD objects are enabled.

Select the HorizontalZObjectBounds to open it's inspector. Set the "**Target Object**" to the object with the box collider. In this case, the '**default'** object inside SCI\_FRS\_13\_HD.

Click **Load Target Object** button.

![Set the Target Object](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fz3IcjYBDtVhiTYD0LuJ2%2Fimage.png?alt=media\&token=b3799b7c-b5b5-4dd0-b724-3bdab4191189)

{% hint style="info" %}
Make sure that the '**default**' asset has a *collider* component.
{% endhint %}

#### 4.3 Verify Asset

Make sure that the HorizontalZObjectBounds is at (0,0.5,0) with a scale of (1,1,2).

If the asset intersects or is completely outside the object bounds, it will turn red.

![Invalid Asset](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FwJ3UGNs4cKgofie9DFGn%2Fimage.png?alt=media\&token=ad4662af-9ff3-4f66-8582-dbd63c9bf4f3)

Make sure that the asset is oriented correctly and is scaled to completely fit inside the bounding box. The Objects bounds must become clear before you continue.

![Fits inside the Bounding Box](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FyhvQKoq43OXrSv3IqwFa%2Fimage.png?alt=media\&token=b0fe40a5-3ea3-40cf-984d-36924b35cc84)

#### 5. Finished!

When it's done and you're satisfied with how the asset looks in-game, it is ready for packaging!


# Packaging an Asset


# Static 3D Object Asset

#### 1. Make sure the 3D Static Object follows the Asset Framework

If not, please check out the tutorial below first:

{% content-ref url="/pages/7gvynmUc7nQ0KbN5bHsW" %}
[3D Static Object In-game Framework](/tutorials/developer/unity/3d-static-object-in-game-framework)
{% endcontent-ref %}

#### 2. Create Parent Object and set asset to child object

Create a new empty Game Object

![Created empty 'FRS' object](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F9xjfxptHJcFoY0qkRlKI%2Fimage.png?alt=media\&token=a9f2e596-6768-48dd-ba8c-f78ca93fb59a)

Make sure the orientation is (0,0,0), location is (0,0,0), and scale is (1,1,1)

![FRS's default location, orientation, and scale](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F7peKzj73aO0AnbVFgx4k%2Fimage.png?alt=media\&token=97fa1c9b-4ffa-4b1a-b2bd-27b8098b3fc1)

Drag the SCI\_FRS\_13\_HD inside the FRS game object.

![Set FRS to the parent of SCI\_FRS\_13\_HD object](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F1YmbaJe52lSx7KQfQoRb%2Fimage.png?alt=media\&token=50cab909-2ab5-4c55-9f28-8f88038201f4)

{% hint style="info" %}
Note: These logical groupings are just as an example. As all the necessary objects are under one Parent game object (in this case, FRS), it's fine to change the child grouping to your liking.
{% endhint %}

#### 3. Create a Prefab

Drag the "FRS" parent object into the Assets folder to create a prefab.

![Drag the object to the project folder to create a prefab](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fi4YE1n9GV3JSLxliUALz%2Fimage.png?alt=media\&token=f429449a-eb53-4bc1-a56d-f922ab737eb1)

#### 4. Set the Prefab's AssetBundle

In the bottom of the Inspector, set the Assetbundle name. In this case, we set it to "frs"

![Set Asset Bundle name](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FWNsCzj8Gwr28R8xPhLat%2Fimage.png?alt=media\&token=fe704c1d-b22a-4b0f-8289-9d5dbfb05bf0)

#### 5. Create the Asset Bundle

On the top left, in the menu, select *Rawrshak -> Asset Bundles.*

This opens Rawrshak's Asset Bundles creator (Asset Packager).

Select the desired *Build Target* to build an asset package for. In this case, select *StandaloneWindows.*

![Select Build Target](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FgEVIPngwFRHuWTazVhli%2Fimage.png?alt=media\&token=9ce42964-2d0d-4bfe-914e-8b927db4d857)

Click *Generate Asset Bundles* button and wait for the asset bundle to be built.&#x20;

{% hint style="info" %}
If you selected Android, iOS, and WebGL, Unity may have to install the necessary modules during the asset bundle generation if these modules were not already installed earlier. This might take a while.
{% endhint %}

#### 6. Viewing the generated Asset Bundle

![Viewing Generated Asset Bundle information](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FI6JOsA34kwrEayA2Xv0n%2Fimage.png?alt=media\&token=7cc51cea-9f48-4804-8bc6-a474aff03b00)

You can click the row of the asset bundle that was generated to view the asset bundle information on the right.

If you click the select checkboxes, you can add the total amount of kilobytes of data you will need to upload. You can click the "Calculator" button to open [ArDrive's price calculator](https://prices.ardrive.io/).

{% hint style="warning" %}
The Asset Information viewer is editable so that the developer may copy it to the asset launcher. However, if the developer changes any of the information, it is not saved.&#x20;

The developer should not change any of this information as this is autogenerated.
{% endhint %}


# Audio Asset

{% hint style="info" %}
Packaging an audio asset is only useful if you want a more efficient file for a platform to load, but you'll need to package an asset for each platform.

Instead, you can upload a RAW version of the file that any platform can use.
{% endhint %}

#### 1. Load audio into the project

![Loaded Audio File in project](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FSRzVSRqt68n3GxvZmOAV%2Fimage.png?alt=media\&token=f0fa876d-d68d-432c-9317-004d80f386b3)

#### 2. Set Asset bundle in the Audio Inspector

At the bottom of the Inspector, set the Assetbundle name. In this case, we set it to "challengeaccepted".

![Set Asset Bundle Name](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FskyDv67JOjNKQaFdTijo%2Fimage.png?alt=media\&token=45c18b78-0cbb-4fff-b0f2-c3d918f89067)

#### 3. Create the Asset Bundle

On the top left, in the menu, select *Rawrshak -> Asset Bundles.*

This opens the Rawrshak's Asset Bundles creator (Asset Packager).

Select the desired *Build Target* to build an asset package for. In this case, select *StandaloneWindows.*

![Select Build Target](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FgEVIPngwFRHuWTazVhli%2Fimage.png?alt=media\&token=9ce42964-2d0d-4bfe-914e-8b927db4d857)

Click *Generate Asset Bundles* button and wait for the asset bundle to be built.&#x20;

{% hint style="info" %}
If you selected Android, iOS, and WebGL, Unity may have to install the necessary modules during the asset bundle generation if these modules were not already installed earlier. This might take a while.
{% endhint %}

#### 4. Viewing the generated Asset Bundle

![View challengeaccepted bundle information](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FbFvalXXh6nWuJRtgZC4m%2Fimage.png?alt=media\&token=c973afd2-0d01-40b9-9f50-79a17a073827)

You can click the row of the asset bundle that was generated to view the asset bundle information on the right.

If you click the select checkboxes, you can add the total amount of kilobytes of data you will need to upload. You can click the "Calculator" button to open [ArDrive's price calculator](https://prices.ardrive.io/).

{% hint style="warning" %}
The Asset Information viewer is editable so that the developer may copy it to the asset launcher. However, if the developer changes any of the information, it is not saved.&#x20;

The developer should not change any of this information as this is autogenerated.
{% endhint %}


# Custom Subgraph Query

### Requirements

* Familiarity with GraphQL queries and The Graph queries (see <https://thegraph.com/docs/en/developer/graphql-api/>)
* A Unity project with the Rawrshak SDK installed

{% hint style="info" %}
Our examples are only for Rawrshak's Content and Exchange subgraphs. A developer can create custom queries for our subgraphs.

A developer can also retrofit this tutorial for any GraphQL source or any subgraph.
{% endhint %}

### Tutorial

#### 1. Create a folder for custom graphql queries

#### 2. Inside that folder, create a "Resources" folder and a "Scripts" folder

#### 3. In the Resources folder, create a text file that contains the GraphQL query

Filename: `GetAssetName.txt`

```
query GetAssetName {{
    asset ( id: "{0}-{1}" ) {{
        name
    }}
}}
```

Notes:

* GraphQL query syntax "{" and "}" must be replaced with "{{" and "}}"
* Query parameters are indexed. `{0}` and `{1}` indicate the first parameter and second parameter for the query.

#### 4. Create Query Script

```
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Numerics;
using UnityEngine;
using UnityEngine.Networking;
using GraphQlClient.Core;
using Rawrshak;

public class GetAssetName: QueryBase
{
    public static async Task<ReturnData> Fetch(string contractAddress, string tokenId) {
        // Load query if this is the first Fetch
        string query = LoadQuery("GetAssetName"); // Where GetAssetName is the filename.
        
        // Load the query parameters
        string queryWithArgs = String.Format(query, contractAddress.ToLower(), tokenId);

        // Post query
        string returnData = await PostAsync(Subgraph.Instance.contentsSubgraphUri, queryWithArgs);

        // Parse data
        return JsonUtility.FromJson<ReturnData>(returnData);
    }

    [Serializable]
    public class ReturnData
    {
        public DataObject data;
    }

    [Serializable]
    public class DataObject 
    {
        public AssetData asset;
    }

    [Serializable]
    public class AssetData 
    {
        public string name;
    }
}
```

Notes:

* This script should inherit from `QueryBase`
* `queryWithArgs` format string should match the number of inputs in the `GetAssetName.txt`
* `Subgraph` object is in the Rawrshak SDK. If pointing to a different subgraph, replace this with the correct subgraph source uri
* The ReturnData object should match the serializable json object returned by the query
* Please check out the [Content ](/developers/rawrshak-subgraphs/entities/content-subgraph)and [Exchange ](/developers/rawrshak-subgraphs/entities/exchange-subgraph)Pages for more info

#### 5. Use the Custom Query

To use the query:

```
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GetAssetInfoScript : MonoBehaviour
{
    // Input
    public string contentContractAddress;
    public int tokenId;

    // Return Value
    public GetAssetName.ReturnData data;

    // Start is called before the first frame update
    async void Start()
    {
        // Test Query
        data = await GetAssetName.Fetch(contentContractAddress, tokenId.ToString());
    }
}
```


# Prefabs

## Under Construction!

{% hint style="info" %}
This content is coming soon! We're working diligently to create this content for our community!

Are you a technical writer who'd like to make the Rawrshak Community better for everyone? Help write this page! Please reach out to <mark style="color:orange;"><contact@rawrshak.io></mark>
{% endhint %}


# Wallet

**Location: Rawrshak/Sample/Wallet**

These samples give the developer an example on how to use the WalletConnect and use the ContentManager object that interacts with a the EVM using ChainSafe's Gaming SDK.

#### WalletPrefab.prefab&#x20;

This prefab contains a Canvas that will generate a QR Code on load. It also contains a WalletConnect object that uses the QR code generated for connecting with a mobile wallet.

#### SafeTransferFromSample script

This script has 2 functions:

* Get the balance of an asset (Press T)
* Assuming a wallet mobile wallet is connected, it transfers an asset from the connect wallet to another wallet (Press Space)


# Subgraph

**Location: Rawrshak/Sample/Subgraph**

These prefabs and scripts give the developer examples on how to use the Rawrshak subgraph queries and how to easily add them to an object.&#x20;

For custom Subgraph queries, please check the [Custom Subgraph Queries tutorial](/tutorials/developer/unity/custom-subgraph-query).


# Ethereum Blockchain Query

**Location: Rawrshak/Sample/Blockchain**

This prefab and script shows the user how to query for Content Contract data. These queries work for any EVM compatible blockchains.&#x20;

The ContentManager queries, however, only run on blockchains that Rawrshak has deployed on. In this case, we've only deployed to Optimistic Kovan Testnet.&#x20;

These queries can be retrofitted to query any EVM compatible blockchain using ChainSafe's Gaming SDK.


# Rawrshak Asset

**Location: Rawrshak/Sample/Assets**

These prefabs are examples of how to load Text, Audio, Image, and Static 3D Assets in Unity. They query the Rawrshak Subgraph for wallet and asset information. It then uses the Rawrshak Asset libraries to download the asset and load the asset onto the scene.&#x20;

To use, the developer can simply drag the prefab onto the scene and run. The developer can check out the scripts attached to the prefabs on how to use it.

Please check out the demo below:

{% hint style="info" %}
Todo: Demo
{% endhint %}


# Rawrshak Dapp


# Deploy a Content Contract

#### 1. Login using the Developer Wallet

Rawrshak Developer Dapp: <https://alpha.rawrshak.io/#/>

![Open the Wallet Tab](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F2nQQUJHOzibQfFh2pRl7%2Fimage.png?alt=media\&token=89f5bd1f-0bec-4c75-8a4d-f428dd44dd6d)

![Click the Connect Button and Connect Metamask Wallet](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F8d4PIAYHQI7LdtwXfa0q%2Fimage.png?alt=media\&token=0d5b9663-3b91-4dac-95e8-73e76a4dbe2e)

#### 2. Select Developer Mode

![Select Developer Mode](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FNxw1YXEHt3IWGbo1kxH0%2Fimage.png?alt=media\&token=15227dfa-6a89-4ebc-aa34-a339bf42d097)

#### 3. Go to Store Page

Store Page: <https://alpha.rawrshak.io/#/store>

![Click the Store Page](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F6PMGZ4R3qo0h8YZJ2390%2Fimage.png?alt=media\&token=4808fcd9-af38-4cb4-b7cc-0da08b756816)

#### 4. Click "*New Smart Contract"*

![Select "Create your first Smart Contract" or "New Smart Contract" to create a new smart contract.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FYOwBm2yFTLwcwtkST6Nt%2Fimage.png?alt=media\&token=4dcc697b-83e3-4431-ba75-f37606155351)

#### 5. Fill in the Information and click *Create*

{% hint style="warning" %}
**IMPORTANT:** If the developer doesn't have an image to use for the contract, they can use the Rawrshak's default content contract image.

Content Contract Image Asset: **<https://arweave.net/dI\\_5bBKqfDwLUHhQXu\\_ubnnBi5f3DcpHQ\\_oHmIky1QU>**

Link: [dI\_5bBKqfDwLUHhQXu\_ubnnBi5f3DcpHQ\_oHmIky1QU](https://osh7s3asvj6dyc2qpbif537onz44dc4x64g4ur2d7idzrcjs2ucq.arweave.net/dI_5bBKqfDwLUHhQXu_ubnnBi5f3DcpHQ_oHmIky1QU)
{% endhint %}

![Fill in Content Contract information and create contract](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FIB2KoGlmMa1BfGzSfk38%2Fimage.png?alt=media\&token=b7f81885-af22-4151-b7d9-bfaff2b1125b)

![Metadata json file is propagating for the Subgraph](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F7ByEQOSvXNRwclsQTOSA%2Fimage.png?alt=media\&token=baac055d-7422-4034-aee8-580e9733bac8)

{% hint style="info" %}
Please refer to the Content Contract metadata for more information.
{% endhint %}

#### 7. Approve and Deploy Transaction

Use Metamask to approve the transaction.&#x20;

![Approve Deployment transaction](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F7R6CmnTdUNMRagNBwrkt%2Fimage.png?alt=media\&token=9f7bdc08-315d-4b1b-947f-22968812857d)

{% hint style="info" %}
Once you click *Create*, it takes 60 seconds for the metadata to be propagated by Pinata so that the Subgraph may read it. Please be patient.&#x20;
{% endhint %}

#### 8. Verify Smart Contract creation

![Content Contract deployed properly in the Store Page](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FP5WBizsNu5zbPxaLfu10%2Fimage.png?alt=media\&token=6c617af8-0283-4ab5-83d8-d2d8bec98f0d)

![Content Contract information](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FqcVME6ZURpZyQkNkMrp9%2Fimage.png?alt=media\&token=c3522e58-7bf7-4d71-a006-476c2f3b2752)

{% hint style="info" %}
The Content subgraph takes a few seconds to a few minutes to update. Please wait for the transaction to propagate.
{% endhint %}

{% hint style="warning" %}

#### \[Alpha Testnet Known Issue]

Once propagated, if the newly creates smart contract did not populate the information, it means the IPFS metadata wasn't propagated properly and TheGraph was not able to parse the metadata. We're looking to switch from Arweave to IPFS, but it is currently not yet supported on TheGraph. The transition will take some time.

In the meantime, please just redeploy a new smart contract.&#x20;
{% endhint %}


# Upload Data to Arweave

### Requirements:

* An Arweave Wallet with AR tokens
* ArDrive login&#x20;

### Tutorial

#### 1. Login to ArDrive

ArDrive: [https://app.ardrive.io](https://app.ardrive.io/#/sign-in)

![Log In to ArDrive](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F7995DUFCtetTnEzTRgJr%2Fimage.png?alt=media\&token=3d411c39-44dc-4f98-8c13-500483a8ecfe)

#### 2. Create the Folders for your file management

![Create Folders for file management](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FojmIjDtncnLTGy6ixAQ5%2Fimage.png?alt=media\&token=644b6807-b0a6-4423-8eca-d8bb5ad3a7cf)

#### 3. Upload the Asset Packages or Asset Files

![Click Upload File](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FE7aHsTB3SIAzBfZSOXSB%2Fimage.png?alt=media\&token=667e200b-3852-43b2-8e3f-2848c99a137e)

![Upload File](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F6yBnqrRn12nQdeU4bhPv%2Fimage.png?alt=media\&token=8c71a2f3-4e93-416d-a32a-6c3dab5ff0da)

#### 4. Wait until the Arweave Transactions are confirmed.

![Arweave Transaction is waiting for confirmation.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FmPj79nJy4FclQNb7gqJY%2Fimage.png?alt=media\&token=48ffc964-d14d-4aa6-887e-785c172e468b)

{% hint style="info" %}
This may take somewhere between a 5 minutes to a few hours.
{% endhint %}

#### 5. Verify Data is uploaded using the *Data* Transaction ID

Data Transaction ID: [TAPvrk0\_cEGhoeb9eYe96MIVp3lbpyqH7RlM6owfg3k](https://jqb67lsnh5yedinb436xtb555dbblj3zlotsvb7ndfgovda7qn4q.arweave.net/TAPvrk0_cEGhoeb9eYe96MIVp3lbpyqH7RlM6owfg3k)

You can verify that the file has been processed and uploaded when the *Orange* pending status has turned to *Green.*&#x20;

The Data Transaction ID will be used when creating a Content Smart Contract or Asset in the NFT Launcher.

{% hint style="info" %}
You can use the Data Tx ID to access the file with the uri:&#x20;

**<https://arweave.net/\\><Data Transaction ID>**&#x20;
{% endhint %}


# Deploying a Meta Asset

#### 1. Go to Store Page in Developer Mode

![Click the Store Page](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F6PMGZ4R3qo0h8YZJ2390%2Fimage.png?alt=media\&token=4808fcd9-af38-4cb4-b7cc-0da08b756816)

#### 2. Select the Content Smart Contract

![Select the Content collection to deploy the asset in](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F0Hn2ORNIo8qC0dAmiXus%2Fimage.png?alt=media\&token=95eb6b2b-f0f6-443a-8403-5b7f86f9792a)

#### 3. Click "*New Asset"*

![Click New Asset to create a new asset NFT](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FWlxskOgdOPL00ZSdyqfF%2Fimage.png?alt=media\&token=fa92b7eb-de58-47fa-8566-5b19a9e214ab)

#### 4. Fill in the Asset Information

{% hint style="warning" %}
**IMPORTANT:** If the developer doesn't have an image to use for the asset, they can use the Rawrshak's default image assets.
{% endhint %}

<table><thead><tr><th width="150">Asset Type</th><th width="596.4285714285713">Default Image URI</th></tr></thead><tbody><tr><td>Text</td><td><strong>https://arweave.net/TsBCV3HyMssIZQk0S7MqZht_zR3e9pBXDWUo0VYAXW4</strong></td></tr><tr><td>Image</td><td><strong>https://arweave.net/2BmDysofcccaTUbjKJHgr9_0ImlFadE00yAS_3E9M00</strong></td></tr><tr><td>Audio</td><td><strong>https://arweave.net/eAnYl_kEpDtYQA8240b0naau5PP4czOFP1qGg4zazQQ</strong></td></tr><tr><td>Static 3D Object</td><td><strong>https://arweave.net/5jpY4ouIl9EXqyep6z0p0S_6nt87DEfsnsxefAa9cOE</strong></td></tr></tbody></table>

![Fill in Asset Information](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FXGVIYyUyQf5rbMGP8m7v%2Fimage.png?alt=media\&token=d5212858-6697-41a9-9a49-f945b23a1d17)

#### 5. Click "Create Asset"

![Click Create Asset](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FxwlFHcJXpBYkBejfVO0V%2Fimage.png?alt=media\&token=0fe25d93-ecb4-4c09-8ddf-deda7dbba3f5)

![PMetadata json file is propagating for the Subgraph](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FUv9MfLijhZxTKYD6oEQK%2Fimage.png?alt=media\&token=075ce1c5-1c08-43f5-a583-4404f8cf79ed)

#### 6. Approve and Deploy Transaction

Use Metamask to approve the transaction.&#x20;

![Approve Deployment transaction](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F7R6CmnTdUNMRagNBwrkt%2Fimage.png?alt=media\&token=9f7bdc08-315d-4b1b-947f-22968812857d)

{% hint style="info" %}
Once you click *Create*, it takes 60 seconds for the metadata to be propagated by Pinata so that the Subgraph may read it. Please be patient.&#x20;
{% endhint %}

#### 7. Verify Asset creation

![Verify Asset was created correctly](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fz4uQbunS8wHEDweXdggJ%2Fimage.png?alt=media\&token=8290a670-f474-45c6-b727-a434036015a4)

{% hint style="info" %}
The Content subgraph takes a few seconds to a few minutes to update. Please wait for the transaction to succeed and propagate to the subgraph.
{% endhint %}

{% hint style="warning" %}

#### \[Alpha Testnet Known Issue]

Once propagated, if the newly created asset did not populate the information, it means the IPFS metadata wasn't propagated properly and TheGraph was not able to parse the metadata. We're looking to switch from Arweave to IPFS, but it is currently not yet supported on TheGraph. The transition will take some time.

In the meantime, please just redeploy a new asset.&#x20;
{% endhint %}


# Image Meta Asset

Please refer to the [Image Asset ](/developers/meta-asset-framework/asset-types/image-assets)for specific requirements of the Image Meta Asset Framework before uploading an asset.&#x20;

#### 1. Find an image that you want to upload.

![Rocketship - Note: This is just a random image. We don't own this image at all.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FYEieMntaLFKSfi5GdauT%2Frocketship.jpg?alt=media\&token=38d3c15f-c881-470a-bbd1-e2b6a5d5e6e9)

#### 2. Upload it to Arweave

Please check out [this tutorial ](/tutorials/developer/rawrshak-dapp/upload-data-to-arweave)in order to upload to Arweave.

#### 3. Connect to the Rawrshak Dapp and navigate your way to the Content Contract page

![Create New Asset](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F9PbolFurA3arNsXyFNj3%2Fimage.png?alt=media\&token=9b28e620-5d02-420d-9e14-2d902a1c5a30)

#### 4. Fill in the information about the Asset

<table><thead><tr><th>Value</th><th width="541.3197616683218">Description</th></tr></thead><tbody><tr><td>Pinata API Key &#x26; Secret </td><td>This is needed for the metadata to be uploaded to IPFS. Please see the <a href="/tutorials/developer/setup/pinata">Pinata tutorial</a> to set this up.</td></tr><tr><td>Name</td><td>Name of the meta asset </td></tr><tr><td>Description</td><td>Description of the meta asset</td></tr><tr><td>Image</td><td>Image src that will show up on Dapps and other front-ends</td></tr><tr><td>Tags</td><td>An array of tags categorizing the asset</td></tr><tr><td>Max Supply</td><td>The maximum instances for this asset that can ever be minted. If left at 0, it will automatically be converted to UINT256_MAX.</td></tr><tr><td>Royalty Receiver Address</td><td>The ethereum address that royalty fees will be sent to. If this is set to the Zero Address, the asset royalty will fall back to the default Content Contract royalty.</td></tr><tr><td>Royalty Rate</td><td>The percent royalty the developer will receive when this asset is traded in a marketplace that supports royalty fees.</td></tr><tr><td>Type</td><td>The Main type of meta asset. In this case, it should be set to Image</td></tr><tr><td>Subtype</td><td>The subtype of the meta asset. Please refer to the <a href="/developers/meta-asset-framework/asset-types/image-assets">Image Assets</a> page to get more info on which subtype to select. Defaults to square.</td></tr><tr><td>NSFW</td><td>Notifies game developers and users of explicit content. Please mark this correctly.</td></tr><tr><td>Image URI (Asset Data)</td><td>The URI to the texture for the specific asset that will be used in-game. This may or may not be the same as the Image.</td></tr><tr><td>Height in Pixels (Asset Data)</td><td>Height of the image in pixels</td></tr><tr><td>Width in Pixels (Asset Data)</td><td>Width of the image in pixels</td></tr><tr><td>Content Type (Asset Data)</td><td>File type of the image (we only support jpeg, svg, and png files)</td></tr></tbody></table>

{% hint style="info" %}
The Image Meta Asset Framework has some requirements for each type and subtype. If your asset doesn't comply with the framework requirements, it may be unloadable by games.&#x20;

Games expect the asset to follow the framework in order for them to load it.
{% endhint %}

![Fill in the Image information](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FEoXgEwTgYLfiWit6QAQS%2Fimage.png?alt=media\&token=eeec9ca0-57a5-4c20-86fb-ac8827acb333)

#### 5. Click *Create Asset* and wait for the Metadata to propagate

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FfJEqRqJdefVTj20P62GH%2Fimage.png?alt=media\&token=fe3c7d8c-7231-4e56-ad94-6b034bb2761b)

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F2os0NQFLTY7GvU8YpaOF%2Fimage.png?alt=media\&token=502ed406-13da-418f-b1b8-735e9e0dd1b1)

#### 6. Wait for the transaction to process and Verify

![Verify asset was created.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FojVOW2PLHCO5ijXXcfUa%2Fimage.png?alt=media\&token=6fa7fc97-f28f-4877-9e59-f0e15344967f)


# Audio Meta Asset

Please refer to the [Audio Asset ](/developers/meta-asset-framework/asset-types/audio-assets)for specific requirements of the Audio Meta Asset Framework before uploading an asset.&#x20;

#### 1. Find an audio file that you want to upload.

{% file src="/files/eciTIuK1xGhnsxkv8HbJ" %}
HIMYM - Challenge Accepted
{% endfile %}

#### 1.A. (Optional) You may also package the asset in a Unity Asset Bundle

Follow the tutorial [here ](/tutorials/developer/unity/packaging-an-asset/audio-asset)on how to package an audio file.

#### 2. Upload it to Arweave

Please check out [this tutorial ](/tutorials/developer/rawrshak-dapp/upload-data-to-arweave)in order to upload to Arweave.

#### 3. Connect to the Rawrshak Dapp and navigate your way to the Content Contract page

![Create New Asset](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F9PbolFurA3arNsXyFNj3%2Fimage.png?alt=media\&token=9b28e620-5d02-420d-9e14-2d902a1c5a30)

#### 4. Fill in the information about the Asset

<table><thead><tr><th>Value</th><th width="541.3197616683218">Description</th></tr></thead><tbody><tr><td>Pinata API Key &#x26; Secret </td><td>This is needed for the metadata to be uploaded to IPFS. Please see the <a href="/tutorials/developer/setup/pinata">Pinata tutorial</a> to set this up.</td></tr><tr><td>Name</td><td>Name of the meta asset </td></tr><tr><td>Description</td><td>Description of the meta asset</td></tr><tr><td>Image</td><td>Image src that will show up on Dapps and other front-ends</td></tr><tr><td>Tags</td><td>An array of tags categorizing the asset</td></tr><tr><td>Max Supply</td><td>The maximum instances for this asset that can ever be minted. If left at 0, it will automatically be converted to UINT256_MAX.</td></tr><tr><td>Royalty Receiver Address</td><td>The ethereum address that royalty fees will be sent to. If this is set to the Zero Address, the asset royalty will fall back to the default Content Contract royalty.</td></tr><tr><td>Royalty Rate</td><td>The percent royalty the developer will receive when this asset is traded in a marketplace that supports royalty fees.</td></tr><tr><td>Type</td><td>The Main type of meta asset. In this case, it should be set to Image</td></tr><tr><td>Subtype</td><td>The subtype of the meta asset. Please refer to the <a href="/developers/meta-asset-framework/asset-types/image-assets">Image Assets</a> page to get more info on which subtype to select. Defaults to square.</td></tr><tr><td>NSFW</td><td>Notifies game developers and users of explicit content. Please mark this correctly.</td></tr></tbody></table>

**Audio Asset Data**

<table><thead><tr><th>Value</th><th width="541.3197616683218">Description</th></tr></thead><tbody><tr><td>Name</td><td>Name of the file. If packaged in an asset bundle, name of the audio clip in the asset bundle as shown using the Rawrshak's AssetBundle Window in Unity</td></tr><tr><td>Engine</td><td>Engine that this file is packaged for. Currently only supports Unity.</td></tr><tr><td>Compression</td><td>This specifies the compression algorithm used when the audio file was packaged. This information is used by the game engine. For Unity, these values can be PCM, ADPCM, or Compressed. Compressed is the default common value. If the file is directly uploaded instead of packaged by the game engine, set this to RAW.</td></tr><tr><td>Audio File URI</td><td>The URI to the audio asset bundle or audio file for the specific asset that will be used in-game. </td></tr><tr><td>Content Type</td><td>File type of the image (we only support wav, mp3, ogg, and aiff files)</td></tr><tr><td>Duration (ms)</td><td>Duration of the audio clip in milliseconds.</td></tr><tr><td>Audio Channel Count</td><td>Number of audio channels for the audio clip.</td></tr><tr><td>Sampling Rate (Hz)</td><td>The sampling rate of audio clip.</td></tr></tbody></table>

{% hint style="info" %}
The Audio Meta Asset Framework has some requirements for each type and subtype. If your asset doesn't comply with the framework requirements, it may be unloadable by games.&#x20;

Games expect the asset to follow the framework in order for them to load it.
{% endhint %}

To get the Duration in milliseconds, Audio Channel Count, and Sampling Rate in Hz, open a Unity project and select the audio file to view the information. Highlighted in the image below are the duration in seconds (red), audio channel count (blue), and sample rate (green).&#x20;

&#x20;Note: Convert the duration to milliseconds and make sure sampling rate is in Hz.

![To fill in the information of the Audio file.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FUUPjOynOWacROfTAAVEf%2Fimage.png?alt=media\&token=00faad2d-cf1e-487c-914b-7d08ae27bc26)

Fill in the Asset Information from the audio information above.

![Create Audio Meta Asset information](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F6HtFx5zB0rfNMmFp2E2K%2Fimage.png?alt=media\&token=26603b45-7a24-4a57-9a3c-fb6e5c03a734)

#### 5. Click *Create Asset* and wait for the Metadata to propagate

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FfJEqRqJdefVTj20P62GH%2Fimage.png?alt=media\&token=fe3c7d8c-7231-4e56-ad94-6b034bb2761b)

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F2os0NQFLTY7GvU8YpaOF%2Fimage.png?alt=media\&token=502ed406-13da-418f-b1b8-735e9e0dd1b1)

#### 6. Wait for the transaction to process and Verify

![Challenge Accepted audio file was added](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FyHPzQKVUffZPvU00mLKF%2Fimage.png?alt=media\&token=46c147ad-63c8-49df-8f58-2a8a153fa52f)


# Static 3D Object Meta Asset

Please refer to the [3D Static Object Asset ](/developers/meta-asset-framework/asset-types/static-3d-objects)for specific requirements of the Audio Meta Asset Framework before uploading an asset.&#x20;

#### 1. Find or Create the model file that you want to upload.

You can use any 3d modelling software and 3d model object file that is supported by Unity. For testing purposes, please you can find free 3d assets at [Sketchfab](https://sketchfab.com/tags/free).&#x20;

{% hint style="info" %}
A more complex model with high definition textures will be a larger file and will cost more to upload to Arweave. This also increases download time. Please check out <https://prices.ardrive.io/> to determine Arweave upload costs per megabyte or gigabyte.
{% endhint %}

#### 2. Create a Unity project and install the Rawrshak Tools SDK

Please refer to [this tutorial](/tutorials/developer/unity/loading-the-rawrshak-tools) on how to install the Rawrshak Tools SDK.

#### 3. Move the asset into the Unity project

![Move the folder containing the asset information including the model and necessary textures into the project](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FMt6r1lZSmbe0g0BS8LxF%2Fimage.png?alt=media\&token=c84d4ab2-7457-41d4-a002-95b0508f8df0)

#### 4. Select the model and drag into the scene. Click the model in the scene and  make sure the Transform is set correctly.

![](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F5OlEKYkwTnGTi7uUiVYp%2Fimage.png?alt=media\&token=cedaebb1-b823-4e5b-bac7-b75de3a66377)

{% hint style="info" %}
Make sure that the Transform is set to the following at the start:

Position: (0,0,0)

Rotation: (0,0,0)

Scale: (1,1,1)&#x20;
{% endhint %}

#### 5. Correct the orientation

Make sure that the front of the asset is pointing towards the Z direction. The Z-direction is the Blue Arrow in the scene.

In this case, we flipped the Y axis 180 degrees.

![Oriented the asset](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FKzgAy1JfcYijFlYVXj3D%2Fimage.png?alt=media\&token=7aa7701b-2da7-47ee-952e-2354f26cce9d)

#### 6. Select the desired Bounding Box and place it in the scene.

Go to Assets\Rawrshak\Tools\Static3dObjectVerfier\Prefabs and select the desired bounding box. In this case, we're going to select Horizontal-Z shape bounding box. Drag that into the scene hierarchy to preserve the position.

{% hint style="info" %}
Make sure to drag the prefab into the Hierarchy Tab, not the Scene tab. This preserves the position.&#x20;

Make sure that the Position of the bounding box matches the initial Position of the prefab by selecting the prefab and comparing its position with the bounding box in the scene. In the example's case, it's position is at (0, 0.5, 0).
{% endhint %}

![Drag Desired bounding box into the hierarchy, into the scene.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FzkYxyOaDKOJcqtlarf9N%2Fimage.png?alt=media\&token=f51a0843-583c-4242-894f-94d314a821b9)

#### 7. Add a Collider to the model

The box collider will be used by the bounding box to determine if the model is within the Asset Framework.&#x20;

Select the largest mesh in the model hierarchy. Select 'Add Component' and search for a Collider component. In this case, we're using a simple box collider.

![Add a Box Collider](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FByUWY39KFA9w0NektUa4%2Fimage.png?alt=media\&token=b1143e26-de5c-4415-8e4b-3ddccba6db59)

#### 7.B. You may need to adjust the Collider if it doesn't fit the mesh correctly.

![Adjust the Box Collider if necessary](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FRbrJ0ixyQOkpMacVMxlQ%2Fimage.png?alt=media\&token=80d4291d-88a0-4bba-b6b2-a6df0a1ecc27)

#### 8. Select the Bounding Box object and set the Target Object to the object that has the box collider. Click "Load Target Object"

![Set the Target Object in the Object Bounds script in the Horizontal Z bounding box object](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FES6f07kWiUu26j3v6CT6%2Fimage.png?alt=media\&token=093c8138-b734-4f4a-bf73-666099dfb32d)

#### 9. Re-scale and re-position the object until the object fits into the bounding box (Bounding Box is white)

![Model intersects with the bounding box.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FtBDgFdi1QtTscdYDb9LO%2Fimage.png?alt=media\&token=a276d2bc-a1bd-4d29-b817-9a92f6620e4f)

![Model is firmly inside the bounding box, the bounding box will turn green.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F9Jlyj24CdTKEaD5ktbxb%2Fimage.png?alt=media\&token=6b02c644-87a7-47d5-b82a-5801c6c74cfb)

#### 10. Create a new Empty Game Object to be the parent of the prefab

![Create Empty object](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FrsMDa8HPcnlxUXW0oDpA%2Fimage.png?alt=media\&token=27b4f217-0b73-41b9-ae35-c02aeb6d53d4)

{% hint style="info" %}
Make sure the position of the new empty object is set to (0,0,0)
{% endhint %}

#### 11. Move the model game object into the parent

![Move the batmobile model into the Batmobile-parent object](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FE4VuVotLLsCcSKLaOnhl%2Fimage.png?alt=media\&token=a5e2b8b5-46bb-4053-b869-d7c6e2b4cd6e)

#### 12. Drag and drop the parent object into the Project Folder in order to create a prefab

![Create a Prefab](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FrmiNeti5JPt8nxwGCZiv%2Fimage.png?alt=media\&token=58c9f24d-deef-40e3-a8b3-0d7cdb274bc6)

#### 13. Set the prefab's asset bundle name

![Set Asset Bundle Name](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FaagOAhMMvqzpwEvnr9OF%2Fimage.png?alt=media\&token=b8ad93dd-f7d6-4fcb-81cc-caeaf53df65e)

#### 14. Open the Asset Bundles Menu, select the Platform Targets, and click Generate Asset Bundles

Go to the menu and select: **Rawrshak -> Asset Bundles**

![Select StandaloneWindows and WebGL, and click the Generate Asset Bundle](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F3nOuFrabNeRdgwvdKzYc%2Fimage.png?alt=media\&token=99fabd01-cb4b-4d23-a12e-0731eaa746e0)

#### 15. View the Asset Bundle Information

![Click the asset bundle and view the information](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FCEStWopB8ZCptF7XaJI0%2Fimage.png?alt=media\&token=2e749179-a9e3-46b8-ae1c-74f3daab5f30)

#### 16. Upload it to Arweave

Please check out [this tutorial ](/tutorials/developer/rawrshak-dapp/upload-data-to-arweave)in order to upload to Arweave.

#### 17. Connect to the Rawrshak Dapp and navigate your way to the Content Contract page

![Create New Asset](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F9PbolFurA3arNsXyFNj3%2Fimage.png?alt=media\&token=9b28e620-5d02-420d-9e14-2d902a1c5a30)

#### 18. Fill in the information about the Asset

<table><thead><tr><th>Value</th><th width="541.3197616683218">Description</th></tr></thead><tbody><tr><td>Pinata API Key &#x26; Secret </td><td>This is needed for the metadata to be uploaded to IPFS. Please see the <a href="/tutorials/developer/setup/pinata">Pinata tutorial</a> to set this up.</td></tr><tr><td>Name</td><td>Name of the meta asset </td></tr><tr><td>Description</td><td>Description of the meta asset</td></tr><tr><td>Image</td><td>Image src that will show up on Dapps and other front-ends</td></tr><tr><td>Tags</td><td>An array of tags categorizing the asset</td></tr><tr><td>Max Supply</td><td>The maximum instances for this asset that can ever be minted. If left at 0, it will automatically be converted to UINT256_MAX.</td></tr><tr><td>Royalty Receiver Address</td><td>The ethereum address that royalty fees will be sent to. If this is set to the Zero Address, the asset royalty will fall back to the default Content Contract royalty.</td></tr><tr><td>Royalty Rate</td><td>The percent royalty the developer will receive when this asset is traded in a marketplace that supports royalty fees.</td></tr><tr><td>Type</td><td>The Main type of meta asset. In this case, it should be set to Image</td></tr><tr><td>Subtype</td><td>The subtype of the meta asset. Please refer to the <a href="/developers/meta-asset-framework/asset-types/image-assets">Image Assets</a> page to get more info on which subtype to select. Defaults to square.</td></tr><tr><td>NSFW</td><td>Notifies game developers and users of explicit content. Please mark this correctly.</td></tr></tbody></table>

**Static 3D Object Asset Data**

<table><thead><tr><th>Value</th><th width="541.3197616683218">Description</th></tr></thead><tbody><tr><td>Name</td><td>This 'name' is reserved for the name of the prefab that will be loaded by the game based on the Asset Names in the Asset bundle Menu.</td></tr><tr><td>Engine</td><td>Engine that this file is packaged for. Currently only supports Unity.</td></tr><tr><td>Platform</td><td>The platform refers to the operating system that the game will be running on. Values include android, ios, windows, and webgl.</td></tr><tr><td>Render Pipeline</td><td>Render Pipeline refers to the specific rendering pipeline that is set for a game engine. Values on this include brp (built-in render pipeline), urp (universal render pipeline), or hdrp (high-definition render pipeline). <strong>For now, we only support the built-in render pipeline so please set it to BRP.</strong></td></tr><tr><td>Fidelity</td><td>Fidelity refers to the asset's quality, ease of download, and ease of loading. Values include low, medium, and high. Definition for Low, Medium, and High Fidelity is to be determined. <strong>For now, please set it to Low.</strong></td></tr><tr><td>Shape</td><td>Shape refers to which type of default asset this object is expecting to replace.Values include small, medium, large, horizontalx, horizontaly, and horizontalz.</td></tr><tr><td>3d Static object file URI</td><td>Uri to the asset package stored in a decentralized database.</td></tr></tbody></table>

{% hint style="info" %}
The Static 3D Object Meta Asset Framework has some requirements for each type and subtype. If your asset doesn't comply with the framework requirements, it may be unloadable by games.&#x20;

Games expect the asset to follow the framework in order for them to load it.
{% endhint %}

To get the prefab name for **Name** section of the Static 3D Object Asset Data, you must open the Asset Bundle Menu, select the bundle name to view the information, and find the correct Asset name.

In this example, it's not *"batmobile"***,** instead it's "***assets/batmobile-parent.prefab"***

![Use the Prefab name for the Name section](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F1kIBwgxGwuVT4IG5tgFt%2Fimage.png?alt=media\&token=d7d89823-cc7a-488e-85fb-0296f802cf27)

#### 19. Fill in the Asset Information from the static 3d object information above.

![Fill in 3D static object information](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fudc8YApKX0eqaqLsqPw0%2Fimage.png?alt=media\&token=c369c8a7-8d72-4d13-bf1a-9f62c4c72d40)

#### 20. Click *Create Asset* and wait for the Metadata to propagate

![Click Create Asset](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FfJEqRqJdefVTj20P62GH%2Fimage.png?alt=media\&token=fe3c7d8c-7231-4e56-ad94-6b034bb2761b)

![Wait for Json to propagate ](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F2os0NQFLTY7GvU8YpaOF%2Fimage.png?alt=media\&token=502ed406-13da-418f-b1b8-735e9e0dd1b1)

#### 21. Wait for the transaction to process and Verify

![Verify for the asset to show up in the contract](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F5PWC9aOMePrDgCRC5Icg%2Fimage.png?alt=media\&token=3b7ec18f-21fa-4a0d-affa-f5c1db0bec46)

If you're running into problems or find any issues, please join our discord and reach out. We'll help answer questions and fix issues as fast as we can.&#x20;

{% content-ref url="/pages/bQHhCYZMWgKIy7YyIIUT" %}
[Community Channels](/rawrshak-platform/community-channels)
{% endcontent-ref %}


# Updating a Meta Asset's Metadata

#### 1. Go to Store Page in Developer Mode

![Click the Store Page](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F6PMGZ4R3qo0h8YZJ2390%2Fimage.png?alt=media\&token=4808fcd9-af38-4cb4-b7cc-0da08b756816)

#### 2. Select the Content Smart Contract

![Select the Content collection to deploy the asset in](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F0Hn2ORNIo8qC0dAmiXus%2Fimage.png?alt=media\&token=95eb6b2b-f0f6-443a-8403-5b7f86f9792a)

#### 3. Select an Asset to edit

![Selecting Smol Ina asset](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F7yGadqkbh0swkhms7f2p%2Fimage.png?alt=media\&token=afb709bb-ba13-4c34-9715-f70466856de4)

#### 4. Click "Edit Metadata" button

![Edit Metadata](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FXc2mLO3xSKgFNiDCzKa7%2Fimage.png?alt=media\&token=3e667ae1-9ea7-4f2f-9390-45d3f2d395e3)

#### 5. Edit the Metadata that needs to get updated, and Click "Update Asset" button

{% hint style="info" %}
Make sure you put in a valid Pinata API Key and API Secret.
{% endhint %}

In this case, we're updating the "Name" of the prefab inside the uploaded AssetBundle.

![Edit "Name"](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FBFZYt3WI6Ryp5TyXids8%2Fimage.png?alt=media\&token=31477429-84fc-4e5d-a8c4-1e83ebaec2ef)

![When ready, click the "Update Asset" button.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FXeL2lu9EEdNlcT3PCScd%2Fimage.png?alt=media\&token=9603ccea-bdee-419c-b187-79063909cc39)

#### 6. Wait for IPFS to propagate the metadata to the subgraph

![Wait for it to succeed](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FMncTpmfV5xxmUtzEkzXE%2Fimage.png?alt=media\&token=2e7a97c7-ddcb-4099-bd51-5d1a80a6e701)

7\. Verify the metadata

![Info in the metadata is read by TheGraph properly](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FW16YhadaNFsUpAra3Ih5%2Fimage.png?alt=media\&token=5b3ab7e2-d7d6-4d5b-bbf5-390e26fabcc6)

If the underlined information is blank, it means the subgraph was not able to process the asset. Please edit the metadata again (send the same 'edit metadata' transaction).


# Minting a Meta Asset

#### 1. Go to Store Page in Developer Mode

![Click the Store Page](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F6PMGZ4R3qo0h8YZJ2390%2Fimage.png?alt=media\&token=4808fcd9-af38-4cb4-b7cc-0da08b756816)

#### 2. Select the Content Smart Contract

![Select the Content collection to deploy the asset in](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2F0Hn2ORNIo8qC0dAmiXus%2Fimage.png?alt=media\&token=95eb6b2b-f0f6-443a-8403-5b7f86f9792a)

#### 3. Select the Asset to mint

![Verify Asset was created correctly](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fz4uQbunS8wHEDweXdggJ%2Fimage.png?alt=media\&token=8290a670-f474-45c6-b727-a434036015a4)

#### 4. Enter the Quantity to mint and click *Mint*

![Set Quantity and Click Mint](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FWZixEtOvd4Qw1RWJ1TMj%2Fimage.png?alt=media\&token=4977d004-f964-4ae0-af38-7b7d27cb0925)

#### 5. Approve and Deploy the Transaction

Use your connected wallet and confirm the Mint Transaction.

![Waiting for Metamask to confirm a transaction.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2Fphoig7b5XoZqwJkmOgBQ%2Fimage.png?alt=media\&token=4d39c037-8900-4c4b-9ff0-92d31d53a7ff)

#### 6. Verify Asset Minting

Confirm that the assets were minted by going to the developer's Inventory and Content contract page.

![Assets are minted.](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FdjM4FAdiZOwrHABQDHWy%2Fimage.png?alt=media\&token=02b2ce1a-84b4-4fd8-9369-80de9de4138f)

{% hint style="info" %}
The Content subgraph takes a few seconds to a few minutes to update. Please wait for the transaction to succeed and propagate to the subgraph.
{% endhint %}


# Selling a Meta Asset

#### 1. Go to Inventory Page in Developer Mode

![Go to the Inventory Page](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FGrJ9m8wzqNXu0JZf38wj%2Fimage.png?alt=media\&token=ab780880-1680-4b7f-b79d-e8fe19559505)

#### 2. Select the Asset to Sell

![Select Asset to Sell](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FInR03BPgqAdL04c9g7WZ%2Fimage.png?alt=media\&token=e83f456f-8e58-4b0c-ba26-5bd5193ccf71)

#### 3. Click *Sell*

![click the Sell button](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FlVmMaMgkpcRqEGzDTig8%2Fimage.png?alt=media\&token=68f253a6-8adc-4c47-97f6-fc8a9e7f2774)

#### 4. Enter the Amount to sell and the Price

![Set Amount to Sell and Price](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FEl8trE8wn1EkLtmmh7Ob%2Fimage.png?alt=media\&token=15228223-a484-4888-afb0-53dc1760043b)

#### 5. Create and Deploy the Approval Transaction (if necessary)

![Approve the NFT transfers for this smart contract and use metamask to approve transaction](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FM167CnQP1PrlxnLhhqdg%2Fimage.png?alt=media\&token=4580df6f-d840-411b-bbe4-fe5af143dfa5)

#### 6. Click *Confirm Sell Order* to create the sell order transaction and Deploy transaction

![Click Confirm Sell Order and use metamask to approve transaction](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FQltd3zqIxzenOZ5Au1aJ%2Fimage.png?alt=media\&token=6ff01b94-d9f1-41a3-b0b9-0c9b52cad716)

#### 8. Verify Sell Order&#x20;

![Verify Sell Order exists](https://3589313620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW434aEw5RavAs7ROSj7s%2Fuploads%2FQakpxS5hEgfqR4xn5jVM%2Fimage.png?alt=media\&token=6cfaf19b-be90-47d2-b32c-3b62ae9be2ec)

{% hint style="info" %}
The Exchange subgraph takes a few seconds to a few minutes to update. Please wait for the transaction to succeed and propagate to the subgraph.
{% endhint %}


# Custom Subgraphs

## Under Construction!

{% hint style="info" %}
This content is coming soon! We're working diligently to create this content for our community!

Are you a technical writer who'd like to make the Rawrshak Community better for everyone? Help write this page! Please reach out to <mark style="color:orange;"><contact@rawrshak.io></mark>
{% endhint %}


# Unity Asset Viewer

{% embed url="<https://github.com/Rawrshak/Unity-Asset-Viewer-Project>" %}
Rawrshak's Unity Asset Viewer Demo Project
{% endembed %}

This project is a Unity game on windows desktop that allows a gamer to view the assets in their wallet. It views Text, Audio, Image, and Static 3D assets.&#x20;

#### Requirements:

* Unity Installed Version: 2020.3

#### Instructions:

1. Clone or fork the asset viewer project repo:

   `git clone` [`https://github.com/Rawrshak/Unity-Asset-Viewer-Project.git`](https://github.com/Rawrshak/Unity-Asset-Viewer-Project.git)
2. Open Unity Hub
3. Add Unity-Asset-Viewer-Project to Unity Hub
4. Open Unity-Asset-Viewer-Project
5. In the Projects tab, open the Assets\Scene folder and load (double-click) SampleScene

{% hint style="info" %}
This project is only a demo project. This is not a production quality game and will probably have bugs. Please use at your own risk.
{% endhint %}

#### Todo:

* Deploy project on WebGL, Android, and/or iOS
* Create a Windows Desktop executable


# Gamer Decentralized Applications

The Gamer Dapp is our front-end application created by the Rawrshak development team for the Rawrshak platform. Because the platform has a decentralized backend, other ecosystem teams are welcome to create their own front-ends or integrate their applications with the platform. The Rawrshak development team created these applications in order to demonstrate the capabilities of Rawrshak's infrastructure.

### Inventory Management

The gamer dapp allows the gamer to view and manage their collection of assets. The goal is to offer the gamers different ways of organizing their assets through logical filtering, long-term and short-term storage, backpacks, etc. Inventory management should constantly reflect quality of life improvements based on the gamer community feedback.  &#x20;

### Marketplace Access

The gamer dapp gives the gamer access to a trading post where they can buy and sell gaming assets in an efficient manner. From the inventory management, the gamer can easily sell their assets as well as buy more of the assets they already own. They can easily find assets they're looking for using the search function. They can filter assets using the tags mechanism. Improvements in the marketplace feature should reflect the requirements of both buyers and sellers.

### On-chain Gaming Systems access

In the future, the gamer dapp will also give access to Rawrshak's on-chain gaming systems. A few of the gaming systems in the pipeline include:

* Crafting and Salvaging
* Lootboxing
* NFT Personalization & Customization

Any future projects may also be accessible through the gamer app.&#x20;

{% embed url="<https://alpha.rawrshak.io>" %}
Check out the Gamer Dapp!
{% endembed %}


# Gaming Marketplace

The Rawrshak gaming marketplace is designed to give a similar experience to existing MMO trading posts. The Rawrshak marketplace should be intuitive and familiar to both veteran and rookie gamers.

### Gaming Marketplace Features

#### Buying and Selling of Bulk items

In existing marketplaces, in order to buy many instances of an item, a user would have to manually fill in orders for each instance of the item. In the Rawrshak marketplace, the user has the ability to acquire many instances of an asset in one transaction.

#### Create Buy and Sell Orders

The marketplace gives the user the ability to create buy orders for assets they need and set a price they're willing to pay for it. Users can also create sell orders for assets they'd like to sell. Orders can be for multiple instances of an item.

#### Instant Buy/Sell

The marketplace gives the user the ability to instantly purchase X amount of items with its order matching system. The user is able to set how many they want to buy and set the maximum they're willing to spend to acquire items.&#x20;

{% embed url="<https://alpha.rawrshak.io/#/marketplace>" %}
Go to the Rawrshak Marketplace!
{% endembed %}


# Meta Assets

Meta Assets are shared permanent blockchain assets that have utility across different worlds. These gaming assets are packaged and deployed in such a way that game developers can easily download the asset, determine if they can be used, and load them in their game. This allows gamers to take their assets wherever they go.

For more information, check out this article on Meta Assets \[Todo: link to Meta Article].

#### Semi-fungible Token

NFT stands for non-fungible token. It is a digital token that exists on the blockchain to record proof of ownership for the person holding it. Each token is completely unique because it has its own metadata that cannot be replicated or replaced for another.&#x20;

Unfortunately, this is very limiting for video games. Not all video game assets *need* to be represented as a unique token. For some assets, it is more efficient to use fungible tokens that link to the same metadata but can be minted and distributed to many users.&#x20;

Because of this, Meta Asset tokens are designed to be semi-fungible. Semi-fungible tokens combine the features of fungible and non-fungible tokens. They represent ownership over items, like NFTs, but all the same items are fungible. Throughout an asset's lifetime, it can become either a fungible or a non-fungible asset.&#x20;

#### Cross-game Interoperability

Rawrshak offers a framework to allow Meta Assets to become cross-game interoperable. The platform gives the content creator a framework for deploying their assets onto different game engines. The standardized metadata underneath packages the deployed assets into a common format that allows games to unpack and display loadable assets.

This allows the gamers to truly own the assets they have purchased or unlocked and take it wherever they go.&#x20;

#### Asset Types

These are the currently supported asset types:

* Text Assets&#x20;
* Audio Assets
* Image Assets
* Static 3d assets

#### Future Asset Types

Some assets types will come in future versions. They may be more complicated and thus require more thought, development time, and feedback from the community. There are no timetables as to when these assets frameworks will be available. Please join the Rawrshak Discord for up-to-date information.

* Character Skins
* Cosmetics (clothes, avatar changes, etc)
* Animations (emotes, taunts, etc)
* Attachables (weapons, backpacks, etc)
* Consumables
* Access Tokens&#x20;


# Supported Wallets

## Wallet Requirements

* Desktop Web Browser and Mobile support
* Ability to change network endpoints
* WalletConnect integration (for in-game usage)

### Metamask

Currently, we only support the Metamask desktop browser wallet and Metamask mobile wallets.

{% hint style="info" %}
We've only tested the project with Metamask. It was the only wallet that allows the switching of the network endpoint which allows the user to connect to the Optimistic Kovan Testnet. If you've tested other wallets, please let us know on our Discord!
{% endhint %}

### Other Wallets

We have not tested other wallets.&#x20;


# Smart Contracts


# Content Contracts


# Content

> <mark style="color:blue;">**EVENTS**</mark>
>
> Mint(operator, data)
>
> Burn(operator, data)

| Mint(address operator, LibAsset.MintData data)                                                        |
| ----------------------------------------------------------------------------------------------------- |
| Event emitted when the <mark style="color:blue;">`mintBatch`</mark> function is called by `operator`. |

| Burn(address operator, LibAsset.BurnData data)                                                        |
| ----------------------------------------------------------------------------------------------------- |
| Event emitted when the <mark style="color:blue;">`burnBatch`</mark> function is called by `operator`. |

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> mintBatch(\_data)
>
> burnBatch(\_data)
>
> contractUri()
>
> uri(\_tokenId)
>
> uri(\_tokenId, \_version)
>
> totalSupply(\_tokenId)
>
> maxSupply(\_tokenId)
>
> contractRoyalty()
>
> userMintNonce(\_user)
>
> royaltyInfo(\_tokenId, \_salePrice)

| mintBatch(LibAsset.MintData \_data)                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Mints a batch of assets.                                                                                                                                                                                                  |
| `_data` MintData structure object. See [LibAsset.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/libasset).                                                                                            |
| Emits a `Mint` event.                                                                                                                                                                                                     |
| <p>Requirements:</p><ul><li>The caller must be verified.</li><li>The specified token Id in <code>\_data</code> must exist.</li><li>The maximum supply of each token will not be surpassed through this minting.</li></ul> |
| visibility: external                                                                                                                                                                                                      |
| state mutability:                                                                                                                                                                                                         |

| burnBatch(LibAsset.BurnData \_data)                                                                                                                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Burns a batch of assets.                                                                                                                              |
| `_data` BurnData structure object. See [LibAsset.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/libasset).                        |
| Emits a <mark style="color:blue;">`Burn`</mark> event.                                                                                                |
| <p>Requirements:</p><ul><li>The caller must be the owner of the tokens or approved by approved by the owner.</li><li>The tokens must exist.</li></ul> |
| visibility: external                                                                                                                                  |
| state mutability:                                                                                                                                     |

| contractUri() -> string                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------- |
| Returns the contract uri.                                                                                                   |
| Passes through [ContentStorage.sol](https://docs.rawrshak.io/developers/smart-contracts/content-contracts/content-storage). |
| visibility: external                                                                                                        |
| state mutability: view                                                                                                      |

| uri(uint256 \_tokenId) -> string                        |
| ------------------------------------------------------- |
| Returns the latest public uri of token type `_tokenId`. |
| visbility: external                                     |
| state mutability: view                                  |

| uri(uint256 \_tokenId, uint256 \_version) -> string                                                                         |
| --------------------------------------------------------------------------------------------------------------------------- |
| Returns the particular public uri of token type `_tokenId` specified by `_version`.                                         |
| Passes through [ContentStorage.sol](https://docs.rawrshak.io/developers/smart-contracts/content-contracts/content-storage). |
| visibility: external                                                                                                        |
| state mutability: view                                                                                                      |

| totalSupply(uint256 \_tokenId) -> uint256                                   |
| --------------------------------------------------------------------------- |
| Returns the total amount of token type `_tokenId` currently in circulation. |
| visibility: external                                                        |
| state mutability: view                                                      |

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

| contractRoyalty() -> address, uint24                                                                                        |
| --------------------------------------------------------------------------------------------------------------------------- |
| Returns the default royalty receiver address and rate for the contract's assets.                                            |
| Passes through [ContentStorage.sol](https://docs.rawrshak.io/developers/smart-contracts/content-contracts/content-storage). |
| visibility: external                                                                                                        |
| state mutability: view                                                                                                      |

| userMintNonce(address \_user) -> uint256        |
| ----------------------------------------------- |
| Returns the nonce of `_user` for this contract. |
| visibility: external                            |
| state mutability: view                          |

| royaltyInfo(uint256 \_tokenId, uint256 \_salePrice) -> address, uint256                                     |
| ----------------------------------------------------------------------------------------------------------- |
| Returns the receiver address and calculated royalty amount for token type `_tokenId` sold for `_salePrice`. |
| visibility: external                                                                                        |
| state mutability: view                                                                                      |


# Content Manager

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> content()
>
> contentStorage()
>
> accessControlManager()
>
> addAssetBatch(\_assets)
>
> registerOperators(\_operators)
>
> setHiddenUriBatch(\_assets)
>
> setPublicUriBatch(\_assets)
>
> setContractRoyalty(\_receive&#x72;*,* \_rate)
>
> setTokenRoyaltiesBatch(\_assets)

| 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:                                                                                                                                 |

| registerOperators(LibAsset.SystemApprovalPair\[] \_operators)                                                                                             |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Updates the wallet's contract access roles.                                                                                                               |
| `_asset` is an array of SystemApprovalPair structure objects. See [LibAsset.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/libasset). |
| visibility: public                                                                                                                                        |
| 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). |
| Passes through [ContentStorage.sol](https://docs.rawrshak.io/developers/smart-contracts/content-contracts/content-storage).                     |
| 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). |
| Passes through [ContentStorage.sol](https://docs.rawrshak.io/developers/smart-contracts/content-contracts/content-storage).                     |
| visibility: external                                                                                                                            |
| state mutability:                                                                                                                               |

| setContractRoyalty(address \_receiver, uint24 \_rate)                                                                       |
| --------------------------------------------------------------------------------------------------------------------------- |
| Sets `_receiver` as the default royalty receiver and `_rate` as the default token royalty.                                  |
| Passes through [ContentStorage.sol](https://docs.rawrshak.io/developers/smart-contracts/content-contracts/content-storage). |
| 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). |
| Passes through [ContentStorage.sol](https://docs.rawrshak.io/developers/smart-contracts/content-contracts/content-storage).                           |
| visibility: external                                                                                                                                  |
| state mutability:                                                                                                                                     |


# 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:                                                                                                                                     |


# Content Factory

> <mark style="color:blue;">**EVENT**</mark>
>
> ContractsDeployed(content, contentManager)

| ContractsDeployed(address content, address contentManager)                                     |
| ---------------------------------------------------------------------------------------------- |
| Event emitted when the <mark style="color:blue;">`createContracts`</mark>  function is called. |

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> updateContracts(\_content, \_contentManager, \_contentStorage, \_accessControlManager)
>
> contentExists(\_content)
>
> contentManagerExists(\_contentManager)
>
> createContracts(\_contractRoyaltyAccount, \_contractRoyaltyRate, \_contractUri)

| updateContracts(address \_content, address \_contentManager, address \_contentStorage, address \_accessControlManager) |
| ---------------------------------------------------------------------------------------------------------------------- |
| Updates contract implementations with `_content`, `_contentManager`, `_contentStorage`, and `accessControlManager`.    |
| <p>Requirements:</p><ul><li>Address parameters cannot be address zero.</li></ul>                                       |
| visibility: public                                                                                                     |
| state mutability:                                                                                                      |

| contentExists(address \_content) -> bool               |
| ------------------------------------------------------ |
| Queries whether the contract address`_content` exists. |
| visibility: public                                     |
| state mutability: view                                 |

| contentManagerExists(address \_contentManager) -> bool         |
| -------------------------------------------------------------- |
| Queries whether the contract address `_contentManager` exists. |
| visibility: public                                             |
| state mutability: view                                         |

| createContracts(address \_contractRoyaltyAccount, uint24 \_contractRoyaltyRate, string \_contractUri) |
| ----------------------------------------------------------------------------------------------------- |
| Deploys new content contracts onto the blockchain and initializes the contract royalties and uri.     |
| Emits a `ContractsDeployed` event.                                                                    |
| visibility: external                                                                                  |
| state mutability:                                                                                     |


# Exchange Contracts


# Exchange

> <mark style="color:blue;">**EVENTS**</mark>
>
> OrderPlaced(from, orderId, order)
>
> OrdersFilled(from, orderIds, amounts, asset, token, totalAssetsAmount, volume)
>
> OrdersDeleted(owner, orderIds)
>
> OrdersClaimed(owner, orderIds)

| OrderPlaced(address from, uint256 orderId, LibOrder.OrderInput order)                    |
| ---------------------------------------------------------------------------------------- |
| Event emitted when the <mark style="color:blue;">`placeOrder`</mark> function is called. |

| OrdersFilled(address from, uint256\[] orderIds, uint256\[] amounts, LibOrder.AssetData asset, address token, uint256 totalAssetsAmount, uint256 volume) |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Event emitted when the functions <mark style="color:blue;">`fillBuyOrder`</mark> or <mark style="color:blue;">`fillSellOrder`</mark> are called.        |

| OrdersDeleted(address owner, uint256 orderIds)                                                        |
| ----------------------------------------------------------------------------------------------------- |
| Event emitted when the <mark style="color:blue;">`cancelOrders`</mark> function is called by `owner`. |

| OrdersClaimed(address owner, uint256\[] orderIds)                                                    |
| ---------------------------------------------------------------------------------------------------- |
| Event emitted when the <mark style="color:blue;">`claimOrders`</mark> function is called by `owner`. |

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> getOrder(id)
>
> tokenEscrow()
>
> nftsEscrow()
>
> claimableRoyalties()
>
> placeOrder(\_order)
>
> fillBuyOrder(\_orderIds, amountToSell, maxSpend)
>
> fillSellOrder(\_orderIds, anountToBuy, maxSpend)
>
> cancelOrders(\_orderIds)
>
> claimOrders(\_orderIds)
>
> claimRoyalties()
>
> addSupportedToken(\_token)

| getOrder(uint256 id) -> LibOrder.Order |
| -------------------------------------- |
| Retrieves `id`'s order information.    |
|                                        |
| visibility: external                   |
| state mutability: view                 |

| tokenEscrow() -> address              |
| ------------------------------------- |
| Retrieves a token's contract address. |
| visibility: external                  |
| state mutability: view                |

| nftsEscrow() -> address                            |
| -------------------------------------------------- |
| Retrieves a non-fungible token's contract address. |
| visibility: external                               |
| state mutability: view                             |

| claimableRoyalties() -> address\[], uint256\[]                                             |
| ------------------------------------------------------------------------------------------ |
| Retrieves the contract address and amount of each token available for the caller to claim. |
| visibility: external                                                                       |
| state mutability: view                                                                     |

| placeOrder(LibOrder.OrderInput \_order)                                                                                           |
| --------------------------------------------------------------------------------------------------------------------------------- |
| Places a buy or sell order with the information `_order` on the exchange and transfers the tokens to escrow.                      |
| `_order` OrderInput structure object. See [LibOrder.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/liborder). |
| emits an <mark style="color:blue;">`OrderPlaced`</mark> event.                                                                    |
| visibility: external                                                                                                              |
| state mutability:                                                                                                                 |

| fillBuyOrder(uint256\[] \_orderIds, uint256 amountToSell, uint256 maxSpend)                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fills buy orders, transferring the sold assets to escrow, and withdrawing token payments from escrow.                                                                                                                     |
| Emits an <mark style="color:blue;">`OrdersFilled`</mark> event.                                                                                                                                                           |
| <p>Requirements:</p><ul><li>Length of <code>\_orderIds</code> must be greater than 0. </li><li><code>\_orderIds</code> must exist.</li><li><code>\_orderIds</code> must be of the same asset and token payment.</li></ul> |
| visibility: external                                                                                                                                                                                                      |
| state mutability:                                                                                                                                                                                                         |

| fillSellOrder(uint256\[] \_orderIds, uint256 amountToBuy, uint256 maxSpend)                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fills sell orders, sending token payments to escrow, and withdrawing the purchased assets from escrow.                                                                                                                    |
| Emits an <mark style="color:blue;">`OrdersFilled`</mark> event.                                                                                                                                                           |
| <p>Requirements:</p><ul><li>Length of <code>\_orderIds</code> must be greater than 0. </li><li><code>\_orderIds</code> must exist.</li><li><code>\_orderIds</code> must be of the same asset and token payment.</li></ul> |
| visibility: external                                                                                                                                                                                                      |
| state mutability:                                                                                                                                                                                                         |

| cancelOrders(uint256\[] \_orderIds)                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Cancels unfilled or partially filled orders and withdraws the unused tokens.                                                                                                               |
| Emits an <mark style="color:blue;">`OrdersDeleted`</mark> event.                                                                                                                           |
| <p>Requirements:</p><ul><li><code>\_orderIds</code> must exist.</li><li><code>\_orderIds</code> must be owned by caller.</li><li>Filled and cancelled orders cannot be canceled.</li></ul> |
| visibility: external                                                                                                                                                                       |
| state mutability:                                                                                                                                                                          |

| claimOrders(uint256\[] \_orderIds)                                                                                                 |
| ---------------------------------------------------------------------------------------------------------------------------------- |
| Withdraws tokens from filled buy or sell orders.                                                                                   |
| Emits an <mark style="color:blue;">`OrdersClaimed`</mark> event.                                                                   |
| <p>Requirements:</p><ul><li><code>\_orderIds</code> must exist.</li><li><code>\_orderIds</code> must be owned by caller.</li></ul> |
| visibility: external                                                                                                               |
| state mutability:                                                                                                                  |

| claimRoyalties()                                                                                                             |
| ---------------------------------------------------------------------------------------------------------------------------- |
| Withdraws royalties available to claim from purchases of their asset made on the exchange.                                   |
| Emits a <mark style="color:blue;">`ClaimedRoyalties`</mark> event.                                                           |
| Passes through [RoyaltyManager.sol](https://docs.rawrshak.io/developers/smart-contracts/exchange-contracts/royalty-manager). |
| visibility: external                                                                                                         |
| state mutability:                                                                                                            |

| addSupportedToken(address \_token)                                                                                    |
| --------------------------------------------------------------------------------------------------------------------- |
| Adds `_token` to the list of supported ERC20 tokens on Rawrshak.                                                      |
| Emits an <mark style="color:blue;">`AddedTokenSupport`</mark> event.                                                  |
| Passes through [Erc20Escrow.sol](https://docs.rawrshak.io/developers/smart-contracts/exchange-contracts/erc20escrow). |
| visibility: external                                                                                                  |
| state mutability:                                                                                                     |


# Orderbook

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> exists(\_orderId)
>
> ordersLength()
>
> verifyOrdersExist(\_orderIds)
>
> verifyAllOrdersData(\_orderIds, \_isBuyOrder)
>
> verifyOrderOwners(\_orderIds, \_owner)
>
> verifyOrdersReady(\_orderIds)
>
> getOrderAmounts(\_orderIds, amountToFill, maxSpend)
>
> getPaymentTotals(\_orderId&#x73;*, \_*&#x61;mounts)
>
> getOrder(\_orderId)
>
> placeOrder(\_order)
>
> fillOrders(\_orderIds, \_amounts)
>
> cancelOrders(\_orderIds)
>
> claimOrders(\_orderIds)

| exists(uint256 \_orderId) -> bool                           |
| ----------------------------------------------------------- |
| Verifies whether the order `_orderId` has ever been placed. |
| visibility: external                                        |
| state mutability: view                                      |

| ordersLength() -> uint256                                                 |
| ------------------------------------------------------------------------- |
| Returns the total number of orders that have been placed on the exchange. |
| visibility: external                                                      |
| state mutability: view                                                    |

| verifyOrdersExist(uint256\[] \_orderIds) -> bool                                                                                                               |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Runs a loop of the <mark style="color:blue;">`exists`</mark> function to verify that all the orders in `_orderIds` exist and have been placed on the exchange. |
| visibility: external                                                                                                                                           |
| state mutability: view                                                                                                                                         |

| verifyAllOrdersData(uint256\[] \_orderIds, bool \_isBuyOrder) -> bool                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Verifies whether all the orders in `_orderIds` reference the same asset and token payment. And it checks that all the orders' buy/sell order type matches `_isBuyOrder`. |
| visibility: external                                                                                                                                                     |
| state mutability: view                                                                                                                                                   |

| verifyOrderOwners(uint256\[] \_orderIds, address \_owner) -> bool         |
| ------------------------------------------------------------------------- |
| Verifies whether the owner of the orders in `_orderIds` matches `_owner`. |
| visibility: external                                                      |
| state mutability: view                                                    |

| verifyOrdersReady(uint256\[] \_orderIds) -> bool                            |
| --------------------------------------------------------------------------- |
| Verifies whether all the orders in `_orderIds` are still available to fill. |
| visibility: external                                                        |
| state mutability: view                                                      |

| getOrderAmounts(uint256\[] \_orderIds, uint256 amountToFill, uint256 maxSpend) -> uint256\[], uint256                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Returns the amount of the asset to be filled from each order in `_orderIds`. The sum of which cannot exceed `amountToFill`, and the cumulative price cannot exceed `maxSpend`. |
| visibility: external                                                                                                                                                           |
| state mutability: view                                                                                                                                                         |

| getPaymentTotals(uint256\[] \_orderIds, uint256\[] \_amounts) -> uint256, uint256\[]                                    |
| ----------------------------------------------------------------------------------------------------------------------- |
| Returns the token payment to be paid for each order in `orderIds` and the cumulative payment for the entire fill order. |
| visibility: external                                                                                                    |
| state mutability: view                                                                                                  |

| getOrder(uint256 \_orderId) -> LibOrder.Order                                                                       |
| ------------------------------------------------------------------------------------------------------------------- |
| Returns the order information of `_orderId`.                                                                        |
| Order structure object. See [LibOrder.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/liborder). |
| visibility: external                                                                                                |
| state mutability: view                                                                                              |

| placeOrder(LibOrder.OrderInput \_order) -> uint256                                                                                |
| --------------------------------------------------------------------------------------------------------------------------------- |
| Places an order on the exchange with order information `_order` and returns the assigned order Id.                                |
| `_order` OrderInput structure object. See [LibOrder.sol](https://docs.rawrshak.io/developers/smart-contracts/libraries/liborder). |
| <p>Requirements:</p><ul><li>The token payment must be on the list of supported ERC20 tokens.</li></ul>                            |
| visibility: external                                                                                                              |
| state mutability:                                                                                                                 |

| fillOrders(uint256\[] \_orderIds, uint256\[] \_amounts)                                             |
| --------------------------------------------------------------------------------------------------- |
| Updates the order information of `_orderIds` as to the amount of assets filled and its order state. |
| visibility: external                                                                                |
| state mutability:                                                                                   |

| cancelOrders(uint256\[] \_orderIds)                                                                               |
| ----------------------------------------------------------------------------------------------------------------- |
| Updates the order state of `_orderIds` to "CANCELLED".                                                            |
| <p>Requirement:</p><ul><li>The order state of the orders must either be "READY" or "PARTIALLY\_FILLED".</li></ul> |
| visibility: external                                                                                              |
| state mutability:                                                                                                 |

| claimOrders(uint256\[] \_orderIds)                                                                                  |
| ------------------------------------------------------------------------------------------------------------------- |
| Updates the order state of `_orderIds` to "CLAIMED" if the order is completely filled and the owner has claimed it. |
| visibility: external                                                                                                |
| state mutability:                                                                                                   |


# Execution Manager

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> tokenEscrow()
>
> nftsEscrow()
>
> verifyToken(\_token)
>
> placeBuyOrder(\_orderId, \_token, \_sender, \_tokenAmount)
>
> placeSellOrder(\_orderId, \_sender,  \_asset, \_assetAmount)
>
> executeBuyOrder(\_user, \_orderIds, \_paymentPerOrder, \_amounts, \_asset)
>
> executeSellOrder(\_user, \_orderIds, \_paymentPerOrder, \_amounts, \_token)
>
> cancelOrders(\_orderIds)
>
> claimOrders(\_user, \_orderIds)
>
> addSupportedToken(\_token)

| tokenEscrow() -> address              |
| ------------------------------------- |
| Retrieves a token's contract address. |
| visibility: external                  |
| state mutability: view                |

| nftsEscrow() -> address                            |
| -------------------------------------------------- |
| Retrieves a non-fungible token's contract address. |
| visibility: external                               |
| state mutability: view                             |

| verifyToken(address \_token) -> bool                                 |
| -------------------------------------------------------------------- |
| Verifies whether the payment token entered is supported by Rawrshak. |
| visibility: external                                                 |
| state mutability: view                                               |

| placeBuyOrder(uint256 \_orderId, address \_token, address \_sender, uint256 \_tokenAmount)                               |
| ------------------------------------------------------------------------------------------------------------------------ |
| Transfers `_tokenAmount` of `_token` from `_sender` to the Erc20Escrow contract and updates the escrowedByOrder mapping. |
| visibility: external                                                                                                     |
| state mutability:                                                                                                        |

| placeSellOrder(uint256 \_orderId, address \_sender, LibOrder.AssetData \_asset, uint256 \_assetAmount)                      |
| --------------------------------------------------------------------------------------------------------------------------- |
| Transfers `_assetAmount` of `_asset` to the NftEscrow contract and updates the escrowedAssets and escrowedAmounts mappings. |
| visibility: external                                                                                                        |
| state mutability:                                                                                                           |

| executeBuyOrder(address \_user, uint256\[] \_orderIds, uint256\[] \_paymentPerOrder, uint256\[] \_amounts, LibOrder.AssetData \_asset)                         |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Transfers assets to escrow to be claimed by buyers and withdraws token payment from escrow to `_user`, updating necessary records.                             |
| <p>Requirement:</p><ul><li>The length of <code>\_orderIds</code> must equal the length of <code>\_paymentPerOrder</code> and <code>\_amounts</code>.</li></ul> |
| visibility: external                                                                                                                                           |
| state mutability:                                                                                                                                              |

| executeSellOrder(address user, uint256\[] \_orderIds, uint256\[] \_paymentPerOrder, uint256\[] \_amounts, address \_token)                                     |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Transfers token payment to escrow to be claimed by sellers and withdraws purchased assets to `_user`, updating necessary records.                              |
| <p>Requirement:</p><ul><li>The length of <code>\_orderIds</code> must equal the length of <code>\_paymentPerOrder</code> and <code>\_amounts</code>.</li></ul> |
| visibility: external                                                                                                                                           |
| state mutability:                                                                                                                                              |

| cancelOrders(uint256\[] \_orderIds)                                                                                                                                                                                                    |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| For buy orders, this function withdraws unused token payments and claims purchased assets (if any, from partial fills). For sell orders, this function withdraws unsold assets and claims token payments (if any, from partial fills). |
| visibility: external                                                                                                                                                                                                                   |
| state mutability:                                                                                                                                                                                                                      |

| claimOrders(address \_user, uint256\[] \_orderIds)                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------- |
| Withdraws escrowed assets from filled or partially filled orders. Updates order state to "CLAIMED" if the order is completely filled. |
| visibility: external                                                                                                                  |
| state mutability:                                                                                                                     |

| addSupportedToken(address \_token)                                                                                    |
| --------------------------------------------------------------------------------------------------------------------- |
| Adds `_token` to the list of supported ERC20 tokens on Rawrshak.                                                      |
| Emits an <mark style="color:blue;">`AddedTokenSupport`</mark> event.                                                  |
| Passes through [Erc20Escrow.sol](https://docs.rawrshak.io/developers/smart-contracts/exchange-contracts/erc20escrow). |
| visibility: external                                                                                                  |
| state mutability:                                                                                                     |


# Royalty Manager

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> claimableRoyalties(\_user)
>
> payableRoyalties(\_asset, \_total)
>
> claimRoyalties(\_user)
>
> transferRoyalty(\_sender, \_token, \_receiver, \_royaltyFee)
>
> transferRoyalty(\_orderId, \_receiver, \_royaltyFee)
>
> transferPlatformFee(\_sender, \_token, \_total)
>
> transferPlatformFee(\_toke&#x6E;*,* \_orderId, \_total)

| claimableRoyalties(address \_user) -> address\[], uint256\[]                                  |
| --------------------------------------------------------------------------------------------- |
| Returns the token contract addresses and corresponding amounts available to claim by `_user`. |
| visibility: external                                                                          |
| state mutability: view                                                                        |

| payableRoyalties(LibOrder.AssetData \_asset, uint256 \_total) -> address, uint256, uint256                             |
| ---------------------------------------------------------------------------------------------------------------------- |
| Returns the royalty fees and the total remaining token payment after the exchange and royalty fees have been deducted. |
| visibility: external                                                                                                   |
| state mutability: view                                                                                                 |

| claimRoyalties(address \_user)                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------ |
| Withdraws any claimable tokens to \_user, and updates the records to reflect that there are no more tokens remaining to claim. |
| Emits a <mark style="color:blue;">`ClaimedRoyalties`</mark> event.                                                             |
| visibility: external                                                                                                           |
| state mutability:                                                                                                              |

| transferRoyalty(address \_sender, address \_token, address \_receiver, uint256 \_royaltyFee) |
| -------------------------------------------------------------------------------------------- |
| Transfers creator royalties from `_sender` to escrow.                                        |
| visibility: external                                                                         |
| state mutability:                                                                            |

| transferRoyalty(uint256 \_orderId, address \_receiver, uint256 \_royaltyFee)                                                   |
| ------------------------------------------------------------------------------------------------------------------------------ |
| Transfers creator royalties deducted from escrowed buy orders to escrow.                                                       |
| <p>Requirement:</p><ul><li>The amount of tokens escrowed must be greater than or equal to <code>\_royaltyFee</code>.</li></ul> |
| visibility: external                                                                                                           |
| state mutability:                                                                                                              |

| transferPlatformFee(address \_sender, address \_token, uint256 \_total) |
| ----------------------------------------------------------------------- |
| Transfers platform fees from `_sender` to stakers, if any.              |
| visibility: external                                                    |
| state mutability:                                                       |

| transferPlatformFee(address \_token, uint256 \_orderId, uint256 \_total)      |
| ----------------------------------------------------------------------------- |
| Transfers platform fees deducted from escrowed buy orders to stakers, if any. |
| visibility: external                                                          |
| state mutability:                                                             |


# Erc20Escrow

> <mark style="color:blue;">**EVENTS**</mark>
>
> ClaimedRoyalties(owner, tokens, amounts)
>
> AddedTokenSupports(token)

| ClaimedRoyalties(address owner, address\[] tokens, uint256\[] amounts)                       |
| -------------------------------------------------------------------------------------------- |
| Event emitted when the <mark style="color:blue;">`claimRoyalties`</mark> function is called. |

| AddedTokenSupport(address token)                                                                 |
| ------------------------------------------------------------------------------------------------ |
| Event emitted when the <mark style="color:blue;">`addSupportedTokens`</mark> function is called. |

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> escrowedTokensByOrder(\_orderId)
>
> claimableTokensByOwner(\_owner)
>
> isTokenSupported(\_token)
>
> addSupportedTokens(\_token)
>
> deposit(\_token, \_orderId, \_sender, \_amount)
>
> withdraw(\_orderId, \_receiver, \_amount)
>
> transferRoyalty(\_token, \_sender, \_owner, \_amount)
>
> transferRoyalty(\_orderId, \_to, \_amount)
>
> transferPlatformFee(\_token, \_sender, \_feesEscrow, \_amount)
>
> transferPlatformFee(\_orderId, \_feesEscrow, \_amount)
>
> claimRoyalties(\_owner)

| escrowedTokensByOrder(uint256 \_orderId) -> uint256                       |
| ------------------------------------------------------------------------- |
| Returns the amount of tokens currently escrowed for the given `_orderId`. |
| visibility: external                                                      |
| state mutability: view                                                    |

| claimableTokensByOwner(address \_owner) -> address\[], uint256\[]                              |
| ---------------------------------------------------------------------------------------------- |
| Returns the token contract addresses and corresponding amounts available to claim by `_owner`. |
| visibility: external                                                                           |
| state mutability: view                                                                         |

| isTokenSupported(address \_token) -> bool                                            |
| ------------------------------------------------------------------------------------ |
| Returns true or false based on whether token type `_token` is supported by Rawrshak. |
| visibility: external                                                                 |
| state mutability: view                                                               |

| addSupportedTokens(address \_token)                                  |
| -------------------------------------------------------------------- |
| Adds `_token` to the list of supported ERC20 tokens on Rawrshak.     |
| Emits an <mark style="color:blue;">`AddedTokenSupport`</mark> event. |
| visibility: external                                                 |
| state mutability:                                                    |

| deposit(address \_token, uint256 \_orderId, address \_sender, uint256 \_amount) |
| ------------------------------------------------------------------------------- |
| Transfers `_amount` of token type `_token` from `_sender` to escrow.            |
| visibility: external                                                            |
| state mutability:                                                               |

| withdraw(uint256 \_orderId, address \_receiver, uint256 \_amount)                                                          |
| -------------------------------------------------------------------------------------------------------------------------- |
| Withdraws `amount` of tokens from escrow to `receiver`.                                                                    |
| <p>Requirement:</p><ul><li>The amount of tokens escrowed must be greater than or equal to <code>\_amount</code>.</li></ul> |
| visibility: external                                                                                                       |
| state mutability:                                                                                                          |

| transferRoyalty(address \_token, address \_sender, address \_owner, uint256 \_amount) |
| ------------------------------------------------------------------------------------- |
| Transfers creator royalties from `_sender` to escrow.                                 |
| visibility: external                                                                  |
| state mutability:                                                                     |

| transferRoyalty(uint256 \_orderId, address \_to, uint256 \_amount)                                                         |
| -------------------------------------------------------------------------------------------------------------------------- |
| Transfers creator royalties deducted from escrowed buy orders to escrow.                                                   |
| <p>Requirement:</p><ul><li>The amount of tokens escrowed must be greater than or equal to <code>\_amount</code>.</li></ul> |
| visibility: external                                                                                                       |
| state mutability:                                                                                                          |

| transferPlatformFee(address \_token, address \_sender, address \_feesEscrow, uint256 \_amount) |
| ---------------------------------------------------------------------------------------------- |
| Transfers platform fees from `_sender` to `_feesEscrow`.                                       |
| visibility: external                                                                           |
| state mutability:                                                                              |

| transferPlatformFee(uint256 \_orderId, address \_feesEscrow, uint256 \_amount) |
| ------------------------------------------------------------------------------ |
| Transfers platform fees deducted from escrowed buy orders to `_feesEscrow`.    |
| visibility: external                                                           |
| state mutability:                                                              |

| claimRoyalties(address \_owner)                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------- |
| Withdraws any claimable tokens to \_owner, and updates the records to reflect that there are no more tokens remaining to claim. |
| Emits a <mark style="color:blue;">`ClaimedRoyalties`</mark> event.                                                              |
| visibility: external                                                                                                            |
| state mutability:                                                                                                               |


# NftEscrow

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> escrowedAmounts(\_orderId)
>
> escrowedAsset(\_orderId)
>
> deposit(\_orderId, \_sender, \_amount, \_assetData)
>
> withdraw(orderId, \_receiver, amount)
>
> withdrawBatch(orderIds, \_receiver, amounts)

| escrowedAmounts(uint256 \_orderId) -> uint256                   |
| --------------------------------------------------------------- |
| Returns the amount of assets escrowed for the given `_orderId`. |
| visibility: external                                            |
| state mutability: view                                          |

| escrowedAsset(uint256 \_orderId) -> address, uint256               |
| ------------------------------------------------------------------ |
| Returns the content address and token Id for the given `_orderId`. |
| visibility: external                                               |
| state mutability: view                                             |

| deposit(uint256 \_orderId, address \_sender, uint256 \_amount, LibOrder.AssetData \_assetData) |
| ---------------------------------------------------------------------------------------------- |
| Transfers `amount` of assets from `_sender` to escrow.                                         |
| visibility: external                                                                           |
| state mutability:                                                                              |

| withdraw(uint256 orderId, address \_receiver, uint256 \_amount) |
| --------------------------------------------------------------- |
| Withdraws `_amount` of assets from escrow to `_receiver`.       |
| visibility: external                                            |
| state mutability:                                               |

| withdrawBatch(uint256\[] orderIds, address \_receiver, uint256\[] amounts) |
| -------------------------------------------------------------------------- |
| Withdraws a batch of assets from escrow to `_receiver`.                    |
| visibility: external                                                       |
| state mutability:                                                          |


# Libraries


# LibAsset

> <mark style="color:blue;">**STRUCTURE OBJECTS**</mark>
>
> CreateData
>
> MintData
>
> BurnData
>
> Asset
>
> AssetUri
>
> AssetRoyalties
>
> SystemApprovalPair

```solidity
struct CreateData {
    string publicDataUri;
    string hiddenDataUri;
    uint256 maxSupply;
    address royaltyReceiver;
    uint24 royaltyRate;
}
```

```solidity
struct MintData {
    address to;
    uint256[] tokenIds;
    uint256[] amounts;
    uint256 nonce;
    address signer;
    bytes signature;
}
```

```solidity
struct BurnData {
    address account;
    uint256[] tokenIds;
    uint256[] amounts;
}
```

```solidity
struct Asset {
    string[] dataUri;
    uint256 version;
}
```

```solidity
struct AssetUri {
    uint256 tokenId;
    string uri;
}
```

```solidity
struct AssetRoyalties {
    uint256 tokenId;
    address royaltyReceiver;
    uint24 royaltyRate;
}
```

```solidity
struct SystemApprovalPair {
        address operator;
        bool approved;
    }
```

```solidity
struct SystemApprovalPair {
    address operator;
    bool approved;
}
```


# LibOrder

> <mark style="color:blue;">**STRUCTURE OBJECTS**</mark>
>
> AssetData
>
> Order
>
> OrderInput

```solidity
struct AssetData {
    address contentAddress;
    uint256 tokenId;
}
```

```solidity
struct Order {
    AssetData asset;
    address owner;
    address token;
    uint256 price;
    uint256 amountOrdered;
    uint256 amountFilled;
    bool isBuyOrder;
    OrderState state;
}
```

```solidity
struct OrderInput {
    AssetData asset;
    address owner;
    address token;
    uint256 price;
    uint256 amount;
    bool isBuyOrder;
}
```

> <mark style="color:blue;">**ENUMBERABLES**</mark>
>
> OrderState

```solidity
enum OrderState {
    READY,
    PARTIALLY_FILLED,
    FILLED,
    CLAIMED,
    CANCELLED
}
```


# Utilities


# Address Resolver

> <mark style="color:blue;">**EVENT**</mark>
>
> AddressRegistered(id, contractAddress)

| AddressRegistered(bytes4 id, address contractAddress)                                                                     |
| ------------------------------------------------------------------------------------------------------------------------- |
| Event emitted for each address registered when the <mark style="color:blue;">`registerAddress`</mark> function is called. |

> <mark style="color:blue;">**FUNCTIONS**</mark>
>
> getAddress(\_id)
>
> getAddressWithCheck(\_id)
>
> registerAddress(\_ids, \_addresses)

| getAddress(bytes4 \_id) -> address                          |
| ----------------------------------------------------------- |
| Queries the registry for the address associated with `_id`. |
| visibility: external                                        |
| state mutability: view                                      |

| getAddressWithCheck(\_id) -> address                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------ |
| Queries the registry for the address associated with `_id`, additionally checking whether the address is not the zero address. |
| visibility: external                                                                                                           |
| state mutability: view                                                                                                         |

| registerAddress(bytes4\[] \_ids, address\[] \_addresses)                                                                                     |
| -------------------------------------------------------------------------------------------------------------------------------------------- |
| Registers key-value pairs using `_ids` and `_addresses` to the registry mapping. This can only be accessed by the Rawrshak development team. |
| Emits an <mark style="color:blue;">`addressRegistered`</mark> event for each address registered.                                             |
| <p>Requirements:</p><ul><li>The length of <code>\_ids</code> must equal the length of <code>\_addresses</code>.</li></ul>                    |
| visibility: external                                                                                                                         |
| state mutability:                                                                                                                            |


# Meta Asset Framework

The Meta Asset Framework is a guide for asset creators to follow in order for their assets to be loadable by games. Game developers expect meta assets to be within the framework for the asset type it's loading. Before loading, the game must verify the asset against the asset type requirements. If verification fails, the game cannot load the user's asset.

The meta asset framework gives game developers and content creators a guide to follow so that their content may traverse different worlds. With this "Deploy Once" strategy, asset launch scalability increases and the need to collaborate with other game developers individually is removed.

From the game developer's perspective, by enabling asset interoperability within their game, the value of their game increases. Players are more inclined to spend time in their game and show off their collections.

### Limitations

#### Game Developer

It is up to the game developer on what type of assets they deem can be loadable. Usable assets depend on the type of game. For example, a 2D side scroller may be able to load Text, Image, and Audio assets, but they cannot load 3D assets.&#x20;

The game developer may also opt to only load assets from content contracts that they own or are official. They may also choose to only load assets that are not NSFW.&#x20;

The game engine SDK has capabilities to filter out assets from a user's wallet based on factors such as asset type, asset subtype, contract addresses, and other asset properties. The game developer may also implement their own filter using Rawrshak's subgraphs.

{% hint style="info" %}
Instructions on how to filter for assets using Rawrshak's subgraphs can be found [here](broken://pages/nQAqKjV0H73XtTqTmvMi).
{% endhint %}

#### Asset Creator

Asset creators must make sure their assets adhere to the asset framework in order for their assets to be loadable. Game developers will make sure assets that are loaded do not break the gameplay, nor provide any in-game advantage.&#x20;

The ecosystem may create a list of banned assets that game developers can check against. If your assets get put on this list, it may lose value in the eyes of gamers.&#x20;


# Asset Metadata

The asset metadata is the common metadata schema for all Rawrshak assets. This metadata contains common information about all assets and will be used by all front-end applications. This metadata schema is what the game engine SDKs expect in order for them to load the asset. Any deviation from this metadata will make the asset unloadable.

{% hint style="warning" %}
The schema is still under development and may change over time before public release. For more information, please refer to [*Public Asset Metadata*](https://github.com/Rawrshak/Asset-Frameworks/blob/main/Drafts/PublicAssetMetadata.md)*.*
{% endhint %}

## Metadata

### Schema

```
{
    "title": "Token Public Metadata",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "Name of the asset"
        },
        "description": {
            "type": "string",
            "description": "Description or lore of the asset which this token represents"
        },
        "image": {
            "type": "string",
            "description": "A URI pointing to a resource with mime type image/* of an asset this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
        },
        "tags": {
            "type": "array",
            "description": "An array of strings that will be used as Tags for the content contract metadata."
        },
        "type": {
            "type": "string",
            "description": "The type of asset that the token is representing. This informs the hidden data reader on how to parse the token's hidden metadata. Values may be text, image, audio, static_object, or other future types that is added."
        },
        "subtype": {
            "type": "string",
            "description": "The subtype of asset that the token is representing. The value depends on what the primary type of the asset is. This informs the hidden data reader if there are any special or custom data in the metadata that it can use. It will also inform the game on how to ideally use the asset."
        },
        "nsfw": {
            "type": "boolean",
            "description": "NSFW indicates that a particular asset contains sexually explicit or other adult content."
        },
        "assetProperties": {
            "type": "object",
            "description": "Asset properties that are specific to the type and subtype of the asset that is necessary to present the asset in-game."
        },
        "devProperties": {
            "type": "object",
            "description": "Arbitrary properties. Values may be strings, numbers, object or arrays. This is data specific to the creator's game or project."
        }
    }
}
```

### Sample

```
{
    "name": "Rawrshak Big Achievement title",
    "description": "Rawrshak Big Achievement title",
    "image": "https://arweave.net/B8P-_xmgnbZZhkAuR3Nty3zeQpsWtewV4MuzHV2Zd9A",
    "tags": [
        "Rawrshak",
        "Title",
        "Big Achievement"
    ],
    "type": "text",
    "subtype": "title",
    "nsfw": false,
    "assetProperties": 
    {
        "title": "Rawrshak Big Achiever",
        "description": "Success in Big Challenge. Player defeated Big Boss."
    },
    "devProperties":
    {
        "experience-gain": 50,
        "level-requirement": 10,
        "unlock-bonus": "AA4424"
    }
}
```


# Asset Types


# Text Assets

The Text Asset metadata framework creates a guide for text-based NFTs such as Titles and Lore. It contains the necessary information and specific requirements. This text asset metadata framework should go in the <mark style="color:blue;">`assetProperties`</mark> object in the Asset Metadata schema.

Text NFTs can be used to convey in-game achievements and unlockable information about in-game content. They may also be used as keys for unlockable content or materials for crafting.&#x20;

## Metadata

### Schema

```
{
    "title": "Asset Properties",
    "type": "object",
    "properties": {
        "title": {
            "type": "string",
            "description": "In-game name of the text asset."
        },
        "description": {
            "type": "string",
            "description": "Description of the asset which this token represents."
        }
    }
}
```

## Subtypes

We define three Text-based NFT frameworks, each with a different use case. Gamers should expect them to be used in a game for its designated use. However, these <mark style="color:blue;">`subtypes`</mark> are merely guides for game developers. They are free to use these text assets however they like in their own game.

{% hint style="info" %}
If a game developer decides to use a text asset differently in their game, they need to notify gamers to change their expectation of how these assets are used for the game.
{% endhint %}

### Title Subtype

Titles are used by gamers to show off their achievements. They can attach titles directly to their wallets as Primary or Secondary titles. Titles are used by players to brag about achievements and show off their unique status.&#x20;

#### Requirement

* `title` must be below 40 characters
* `description` must be below 500 characters

#### Sample

```
{
    ...
    "assetProperties": 
    {
        "title": "Original Community Member",
        "description": "The earliest of Rawrshak community members.",
    },
    ...
}
```

### Lore Subtype

Lore assets can be used as unlockable information. They are used by game developers to add more background information to characters, places, events, or any content. These are used to build a richer world through collectibles and unlockable content.&#x20;

#### Requirement

* `lore` must be below 40 characters
* `description` must be below 5000 characters

#### Sample

```
{
    ...
    "assetProperties": 
    {
        "title": "Sample Lore",
        "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
    },
    ...
}
```

### Custom Subtype

Custom text assets are text assets that do not have a specific use case. It is used by game developers who need a text asset that doesn't fit with the subtypes above. These Custom text assets should only be loaded by the game of the creator which knows full well what the asset is.&#x20;

Other game developers shouldn't load these because it's a security risk.&#x20;

#### Requirement

{% hint style="info" %}
No Requirements
{% endhint %}


# Image Assets

The Image Asset metadata framework creates a guide for image-based NFTs such as Logos, Sprays, Decals, Emblems, Banners, and other image assets. It contains the necessary information and specific requirements. This image asset metadata framework should go in the <mark style="color:blue;">`assetProperties`</mark> object in the Asset Metadata schema.

Image NFTs have many different use cases both in-game and outside of a game. Game developers can reward players with unique art related to their intellectual property that gamers can then show off. As gamers take these assets to other games, it then functions as an advertisement. It enables cross pollination of playerbases between games in the Rawrshak ecosystem.

## Metadata

### Schema

```
{
    "title": "Asset Properties",
    "type": "object",
    "properties": {
        "textures": {
            "type": "array",
            "description": "An array of texture objects"
        }
    }
}

{
    "title": "Texture",
    "type": "object",
    "properties": {
        "uri": {
            "type": "string",
            "description": "link to the texture object"
        },
        "height": {
            "type": "int",
            "description": "Height of the texture in Pixels"
        },
        "width": {
            "type": "int",
            "description": "Width of the texture in Pixels"
        },
        "contentType": {
            "type": "string",
            "description": "content type. Can be image/png, image/jpg, image/svg"
        }
    }
}
```

## Subtypes

The subtypes are categorized based on asset requirements instead of use case because images can be re-used in many different use cases as long as they fit the specific asset requirements. The use case is limited by the shape of the image, and thus, we use the shape to categorize Image assets.

### Square Subtype

Square image assets are the simplest of image assets. They are probably the most common and can be used in-game for many different reasons such as decals, sprays, guild emblems, etc. They can be used to show off a gamer's affiliations or group.&#x20;

#### Requirement

* aspect ratio must be 1:1
* `textures` array must contain a 256x256 pixel image as the default asset.
* Texture sizes may range from 48x48 to 1024x1024 pixels

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "uri": "arweave.net/<tx>",
            "height": 256,
            "width": 256,
            "contentType": "image/png"
        },
        {
            "uri": "arweave.net/<tx>",
            "height": 512,
            "width": 512,
            "contentType": "image/png"
        },
        {
            "uri": "arweave.net/<tx>",
            "height": 1024,
            "width": 1024,
            "contentType": "image/png"
        }
    ],
    ...
}
```

### Horizontal Banner Subtype

Horizontal Banner assets have a more limited use case than the square image asset. Horizontal banner assets can be used in situations where the asset spans across the screen horizontally.

#### Requirement

* aspect ratio must be 2:1
* `textures` array must contain a 256x128 pixel image as the default asset.
* Texture sizes may range from 96x48 to 1024x512 pixels

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "uri": "arweave.net/<tx>",
            "height": 128,
            "width": 256,
            "contentType": "image/png"
        },
        {
            "uri": "arweave.net/<tx>",
            "height": 256,
            "width": 512,
            "contentType": "image/png"
        },
        {
            "uri": "arweave.net/<tx>",
            "height": 512,
            "width": 1024,
            "contentType": "image/png"
        }
    ],
    ...
}
```

### Vertical Banner Subtype

Similar to horizontal banner assets, Vertical Banner assets have a more limited use case than the square image asset. Vertical banner assets can be used in situations where the asset spans across the screen vertically.

#### Requirement

* aspect ratio must be 1:2
* `textures` array must contain a 128x256 pixel image as the default asset.
* Texture sizes may range from 48x96 to 512x1024 pixels

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "uri": "arweave.net/<tx>",
            "height": 256,
            "width": 128,
            "contentType": "image/png"
        },
        {
            "uri": "arweave.net/<tx>",
            "height": 512,
            "width": 256,
            "contentType": "image/png"
        },
        {
            "uri": "arweave.net/<tx>",
            "height": 1024,
            "width": 512,
            "contentType": "image/png"
        }
    ],
    ...
}
```

### Custom Subtype

The custom subtype doesn't have a requirement for aspect ratio and doesn't have a default texture requirement dimension. The creator is free to choose what they want to use in their games and NFT. The custom subtype, however, should not be loadable in other games aside from the creator's game. The dimensions must still be a power of 2.

#### Requirement

* The dimensions must still be a power of 2.

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "uri": "arweave.net/<tx>",
            "height": 128,
            "width": 512,
            "contentType": "image/png"
        }
    ],
    ...
}
```


# Audio Assets

The Audio Asset metadata framework creates a guide for audio-based NFTs such as sound effects, character lines, shouts, and background music. It contains the necessary information and specific requirements that allows game developers to easily parse the information and load the audio file. This audio asset metadata framework should go in the <mark style="color:blue;">`assetProperties`</mark> object in the Asset Metadata schema.

Audio NFTs can be used in many different manners such as rewarding players with short sound effects, character lines, background music, shouts, quotes, etc. In-game audio NFTs can add an extra layer of customization for gamers.&#x20;

## Metadata

### Schema

```
{
    "title": "Asset Properties",
    "type": "object",
    "properties": {
        "audio": {
            "type": "object",
            "description": "An array of texture objects"
        }
    }
}

{
    "title": "Audio",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "name of the AudioClip that's stored in the package"
        },
        "engine": {
            "type": "string",
            "description": "engine which this package supports. Values include none, unity, and unreal. none refers to the raw, uncompressed, unpackaged file for use by dapps."
        },
        "compression": {
            "type": "string",
            "description": "specifies the compression algorithm used when the audio file was packaged. For Unity, these values can be PCM, ADPCM, or Compressed. Compressed is the default common value."
        },
        "uri": {
            "type": "string",
            "description": "uri to the downloadable file or audio package"
        },
        "contentType": {
            "type": "string",
            "description": "content type. Can be audio/mpeg, audio/wav, audio/ogg, audio/x-aiff"
        },
        "duration": {
            "type": "int",
            "description": "duration of the audio clip in milliseconds"
        },
        "channelCount": {
            "type": "int",
            "description": "channel count of the audio clip"
        },
        "sampleRate": {
            "type": "int",
            "description-hz": "sample rate of the audio clip in Hz"
        },
    }
}
```

## Subtypes

We define five Audio-based NFT frameworks, each with a different use case. Gamers should expect them to be used in a game for its designated use. However, these <mark style="color:blue;">`subtypes`</mark> are merely guides for game developers, they are free to use them wherever they want to in their game.

### Sound Effect Subtype

Sound effect assets are short audio clips used for sound effects.&#x20;

#### Requirement

* Maximum `duration` of 1 second.
* When loaded by a game, it should be kept in memory as it can be attached to any in-game asset.&#x20;

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "name": "unlockEffect.wav",
            "engine": "none",
            "compression": "raw",
            "uri": "arweave.net/<transaction-id>",
            "contentType": "audio/wav",
            "duration": "500",
            "channelCount": 1,
            "sampleRate": 44100
        }
    ],
    ...
}
```

### Shout Subtype

Shout assets are short character lines used for quick taunts, player communication, or character reactions.&#x20;

#### Requirement

* Maximum `duration` of 2 seconds.
* When loaded by a game, it should be kept in memory as they can be used by the player at any time.

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "name": "Rage.wav",
            "engine": "none",
            "compression": "raw",
            "uri": "arweave.net/<transaction-id>",
            "contentType": "audio/wav",
            "duration": "1200",
            "channelCount": 1,
            "sampleRate": 44100
        }
    ],
    ...
}
```

### Character Line Subtype

Character line assets are longer character lines used for taunts, reactions, or other special character actions. Character line assets are optional to keep in memory or loaded on demand as necessary. The game developer may allow players to say these lines at any time or may have specific locations/situations where they can be loaded and played.&#x20;

#### Requirement

* Maximum `duration` of 10 seconds.

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "name": "ToInfintyAndBeyond.mp3",
            "engine": "none",
            "compression": "raw",
            "uri": "arweave.net/<transaction-id>",
            "contentType": "audio/mp3",
            "duration": "7800",
            "channelCount": 1,
            "sampleRate": 44100
        }
    ],
    ...
}
```

### Background Music Subtype

Background Music assets are longer audio NFTs that may be sold by game developers or unlocked in-game. This allows gamers to take music that they like from a game and use them in any game they wish to play. Game developers may opt to allow gamers to play their own background music playlist in-game.

This asset is loaded per gamer and is not shared during gameplay. They are loaded on demand and shouldn't be kept in memory.

#### Requirement

* Maximum `duration` of 300 seconds.

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "name": "flute.wav",
            "engine": "none",
            "compression": "raw",
            "uri": "arweave.net/<transaction-id>",
            "contentType": "audio/wav",
            "duration": "280000",
            "channelCount": 1,
            "sampleRate": 44100
        }
    ],
    ...
}
```

### Custom Subtype

The custom subtype doesn't have a requirement for duration or how it's loaded by the game. The creator is free to create this asset however they see fit. The custom subtype, however, should not be loadable in other games aside from the creator's game.&#x20;

#### Requirement

{% hint style="info" %}
No Requirements
{% endhint %}

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "name": "custom.wav",
            "engine": "none",
            "compression": "raw",
            "uri": "arweave.net/<transaction-id>",
            "contentType": "audio/wav",
            "duration": "57800",
            "channelCount": 1,
            "sampleRate": 44100
        }
    ],
    ...
}
```


# Static 3D Objects

The Static 3D Object asset metadata framework creates a guide for static 3d object NFTs such as Trophies and Decorations. This contains the information for non-animated 3d asset NFTs. The proposed metadata format enables game developers to easily parse information for static 3d asset NFTs for in-game use. This static 3d object asset metadata framework should go in the <mark style="color:blue;">`assetProperties`</mark> object in the Asset Metadata schema.

Static 3D Object Assets are assets that do not contain animation and must contain a model and materials packaged together.&#x20;

These NFTs can be used in many different manners such as rewarding players with trophies alongside achievements, static character models, furniture, buildings, static animals, automobiles, or whatever type of in-game asset.

## Metadata

### Schema

```
{
    "title": "Asset Properties",
    "type": "object",
    "properties": {
        "textures": {
            "type": "array",
            "description": "An array of Prefab objects"
        }
    }
}

{
    "title": "Prefab",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "name of the prefab that's stored in the package"
        },
        "engine": {
            "type": "string",
            "description": "engine which this package supports. Values include unity, unreal, and godot."
        },
        "platform": {
            "type": "string",
            "description": "platform refers to the operating system that the game is on. Values include android, ios, windows, and webgl."
        },
        "renderPipeline": {
            "type": "string",
            "description": "renderPipeline refers to the specific rendering pipeline that is set for a game engine. values on this include brp (built-in render pipeline), urp (universal render pipeline), or hdrp (high-definition render pipeline)."
        },
        "fidelity": {
            "type": "string",
            "description": "fidelity refers to the asset's quality, ease of download, and ease of loading. Values include low, medium, and high."
        },
        "shape": {
            "type": "string",
            "description": "shape refers to which type of default asset this object is expecting to replace.Values include small, medium, large, horizontalx, horizontaly, and horizontalz."
        },
        "uri": {
            "type": "string",
            "description": "uri to the asset package stored in a decentralized database."
        }
    }
}
```

### Default Properties

| Property        |                          |
| --------------- | ------------------------ |
| Game Engine     | Unity                    |
| Platform        | Windows Standalone 64    |
| Render Pipeline | Built-in Render Pipeline |
| Fidelity        | Low                      |

### Properties

<table><thead><tr><th width="537">Game Engine</th><th data-type="checkbox">Supported</th></tr></thead><tbody><tr><td>Unity</td><td>true</td></tr><tr><td>Unreal</td><td>false</td></tr><tr><td>Godot</td><td>false</td></tr></tbody></table>

<table><thead><tr><th width="524">Render Pipelines</th><th data-type="checkbox">Supported</th></tr></thead><tbody><tr><td>Built-in Render Pipeline (Unity)</td><td>true</td></tr><tr><td>Universal Render Pipeline (Unity)</td><td>false</td></tr><tr><td>High Definition Render Pipeline (Unity)</td><td>false</td></tr></tbody></table>

<table><thead><tr><th width="538.7210383539207">Platforms</th><th data-type="checkbox">Supported</th></tr></thead><tbody><tr><td>Standalone Windows 64 (Unity)</td><td>true</td></tr><tr><td>Android (Unity)</td><td>true</td></tr><tr><td>iOS (Unity)</td><td>true</td></tr><tr><td>WebGL (Unity)</td><td>true</td></tr></tbody></table>

<table><thead><tr><th width="381.7210383539207">Asset Shape</th><th width="150" data-type="number">Width</th><th width="150" data-type="number">Height</th><th data-type="number">Depth</th></tr></thead><tbody><tr><td>Small Object</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Medium Object</td><td>2</td><td>2</td><td>2</td></tr><tr><td>Large Object</td><td>4</td><td>4</td><td>4</td></tr><tr><td>Horizontal X Object</td><td>2</td><td>1</td><td>1</td></tr><tr><td>Horizontal Y Object</td><td>1</td><td>2</td><td>1</td></tr><tr><td>Horizontal Z Object</td><td>1</td><td>1</td><td>2</td></tr></tbody></table>

{% hint style="warning" %}
There isn't a clear asset specification when it comes to levels of fidelity. Currently, only "low" is supported.
{% endhint %}

<table><thead><tr><th width="541">Levels of Fidelity</th><th data-type="checkbox">Supported</th></tr></thead><tbody><tr><td>Low</td><td>true</td></tr><tr><td>Medium</td><td>false</td></tr><tr><td>High</td><td>false</td></tr></tbody></table>

## Asset Requirement

Static 3D objects have a few specific requirements. The asset must be oriented in the correct location and located at the correct position. Once the asset is loaded in-game, it will be instantiated in the orientation, scaling, and location of a default asset.&#x20;

#### Asset Orientation

The asset's prefab must be oriented towards the +Z direction. The default camera is placed at (0,1,3) and oriented towards (0,0,0). The prefab's "front" must be facing the camera.

#### Asset Location

The asset's prefab must be defaulted to the origin. The asset must be above the origin (0,0,0). The testing bounding boxes and default assets are expecting the asset to be at the origin before the prefab is packaged.&#x20;

#### Verification

The Rawrshak Unity tools has testing bounding boxes that help the asset creator determine if their 3d asset fits within the bounds of the expected asset shape. It will help make sure the asset is within the asset shape framework before it is set for packaging.

## Subtypes

We define two static 3d object NFT frameworks, each with a different use case. Gamers should expect them to be used in a game for its designated use. The subtypes are divided based on use-case.

### Trophy Subtype

Trophies are static 3d objects that are rewarded to users for achievements in-game.&#x20;

#### Requirement

* `shape` must be "small"

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "name": "rawr-trophy",
            "engine": "unity",
            "renderPipeline": "brp",
            "platform": "windows",
            "fidelity": "low",
            "shape": "small",
            "uri": "arweave.net/<transaction-id>"
        },
        {
            "name": "rawr-trophy",
            "engine": "unity",
            "renderPipeline": "brp",
            "platform": "ios",
            "fidelity": "low",
            "shape": "small",
            "uri": "arweave.net/<transaction-id>"
        },
        {
            "name": "rawr-trophy",
            "engine": "unity",
            "renderPipeline": "brp",
            "platform": "android",
            "fidelity": "low",
            "shape": "small",
            "uri": "arweave.net/<transaction-id>"
        },
        {
            "name": "rawr-trophy",
            "engine": "unity",
            "renderPipeline": "brp",
            "platform": "webgl",
            "fidelity": "low",
            "shape": "small",
            "uri": "arweave.net/<transaction-id>"
        },
        {
            "name": "rawr-trophy",
            "engine": "unity",
            "renderPipeline": "brp",
            "platform": "windows",
            "fidelity": "medium",
            "shape": "small",
            "uri": "arweave.net/<transaction-id>"
        },
        {
            "name": "rawr-trophy",
            "engine": "unity",
            "renderPipeline": "brp",
            "platform": "high",
            "fidelity": "medium",
            "shape": "small",
            "uri": "arweave.net/<transaction-id>"
        }
    ],
    ...
}
```

### Decoration Subtype

Decorations are static 3d objects that are acquired by users. There is no specific shape requirement for these assets. They can be loaded anywhere and placed anywhere. There's no specific usage designated for this type of static 3d object.

#### Requirement

{% hint style="info" %}
No Requirements
{% endhint %}

#### Sample

```
{
    ...
    "assetProperties": 
    [
        {
            "name": "rawr-figure",
            "engine": "unity",
            "renderPipeline": "brp",
            "platform": "windows",
            "fidelity": "low",
            "shape": "small",
            "uri": "arweave.net/<transaction-id>"
        }
    ],
    ...
}
```


# Game Engines


# Unity Game Engine

## Specific Requirements

### Supported Versions

* 2020.3+ (tested 2020.3)
* 2021.1+ (tested 2021.1)

### Supported Platforms

* Standalone Windows
* Standalone Windows 64
* WebGL
* Android
* iOS

### Supported Render Pipelines

* Built-in Render Pipeline

Future:

* High Definition Render Pipeline
* Universal Render Pipeline

## Supported&#x20;


# Unity SDK

The Rawrshak Unity SDK is a unity asset package that contains libraries that help the game developer integrate their game to blockchain technologies and the Rawrshak platform infrastructure. The Rawrshak Unity SDK has a dependency on ChainSafe's Gaming SDK and WalletConnect for Unity.&#x20;

### WalletConnect Integration and Wallet Management

The WalletConnect integration allows gamers to use their mobile wallets to interact with Unity games. It allows game developers to simply push transaction requests to the mobile wallet. The Wallet Management library enables the game developer to easily query and filter assets in a gamer's wallet.&#x20;

### Asset Minter

{% hint style="danger" %}
This is still under development and not yet included in the Unity SDK.
{% endhint %}

The Asset Minter library gives the game the ability to mint assets unlocked by the user and automatically sends it to the gamer's wallet.

### Asset Downloader

The Asset Downloader library gives the developer the ability to easily download metadata and assets from Arweave (or other decentralized storages) or IPFS. It also caches the asset for future use if necessary.

### Asset Loader

The Asset Loader library gives the developer the ability to easily load and instantiate an asset in a player's wallet. Once the asset has been downloaded, the asset loader can instantiate the asset and replace the placeholder asset.

### Subgraph Data Queries

The GraphQL library allows the developer to use the provided graphql queries in order to get more information about an asset that is not easily attainable from the blockchain queries. The Graph's infrastructure is used to index relationships between objects.&#x20;

The developer can also create their own queries if there is specific information in the subgraph that they need. They can create their own in-game dashboards using these custom queries.&#x20;

{% hint style="info" %}
Please refer to the [Rawrshak Subgraph ](/developers/rawrshak-subgraphs/entities)pages for more information.
{% endhint %}


# Unity Tools

Rawrshak provides Unity game engine tools to make packaging assets for the Asset Framework easy for game developers and content creators. The following is a list of tools in the Rawrshak Unity Tools asset package:

### Asset Bundle Creator tool

The Asset Bundle Creator tool is a Unity Editor window that contains tools for building and packaging asset bundles. The Asset Bundle Creator compiles and builds asset bundles for the supported platforms (Windows, iOS, Android, and WebGL). It gives the user the ability to view the information specific to the compiled asset bundle which will be used to create the asset NFT metadata.

In the future, we hope to upload the asset bundle directly to decentralized storage and then deploy the asset directly from this tool without having to go through the developer dapp.

### Static 3D Object Verifier&#x20;

The Static 3D Object Verifier helps the asset creator verify that the asset prefab they are deploying follows the asset framework. The verifier is attached to a bounding box of the target shape. The bounding box will turn red if the asset doesn't fit inside.&#x20;

## Latest Release

To find the latest Unity Tools release, download it below:

{% embed url="<https://github.com/Rawrshak/Unity-Tools/releases>" %}
Latest Rawrshak Unity Tools asset package
{% endembed %}


# Unreal Game Engine

### Not Supported

Currently, we have not released tools or libraries for Unreal Game engines. We hope to support it in the future.


# Godot Game Engine

### Not Supported

Currently, we have not released tools or libraries for Godot Game engine. We hope to support it in the future.


# Developer Decentralized Applications

The Developer Dapp is the front-end application created by the Rawrshak development team for content creators and developers. Because the platform has a decentralized backend, other ecosystem teams are welcome to create their own front-ends or integrate their applications with the platform. The Rawrshak development team created these applications in order to demonstrate the capabilities of Rawrshak's infrastructure.

### Smart Contract and Asset Management

The developer dapp gives the game developers an easy way to deploy smart contracts and asset NFTs for their games. This lowers the barrier to entry for game developers to integrate their games with blockchain technologies.&#x20;

The developer dapp allows the developer to mint, organize, and manage their collection of assets. The goal is to offer the developers and creators the tools they need to best interact and manage the asset NFTs that they create. Inventory management should constantly reflect quality of life improvements based on the game developer and content creator community feedback.  &#x20;

### Marketplace Access

The developer dapp gives the creators access to a trading post. The marketplace is a place where they can easily sell their minted assets or distribute them to the ecosystem. The developer dapp should give the developer a dashboard where they can view their contract's marketplace information and individual asset's market information. Having sales information logically displayed influences a developer's decisions regarding future assets.&#x20;

The developer dapp is also where creators can claim their asset sales and secondary trading royalties.&#x20;

### On-chain Gaming Systems access

In the future, the developer dapp will also give access to Rawrshak's on-chain gaming systems. A few of the gaming systems in the pipeline include:

* Crafting and Salvaging
* Lootboxing
* NFT Personalization & Customization

The developer dapp is where game developers will interface with any future Rawrshak project. New projects are entirely optional to developers, and they are free to integrate it with their game as they see fit.&#x20;


# Rawrshak Subgraphs

Rawrshak is deploying public subgraphs that index the information for all projects on the platform. Anyone can use these subgraphs to query the ecosystem data to build web dashboards or in-game dashboards.


# Entities


# Content Subgraph

The Content Subgraph contains indexed information about content contracts, the assets, and users.

### Contents Optimistic Kovan GraphiQL&#x20;

{% embed url="<https://thegraph.com/hosted-service/subgraph/gcbsumid/contents-optimistic-kovan>" %}
Try querying the Content Subgraph!
{% endembed %}

### Schemas

#### Entities

<details>

<summary>Content Contract</summary>

```
type Content @entity {
  id: ID!
  factory: ContentFactory!
  manager: ContentManager!
  contractAddress: Bytes!
  contractUri: String!
  assets: [Asset!]!
  assetsCount: BigInt!
  royaltyReceiver: Account!
  royaltyRate: Int!
  minters: [Minter!]
  mintersCount: Int!
  name: String
  game: String
  creator: String
  creatorAddress: String
  owner: Account!
  tags: [Tag!]!
  tagsCount: Int!
}
```

</details>

<details>

<summary>Asset</summary>

```
type Asset @entity{
  id: ID!
  tokenId: BigInt!
  parentContract: Content!
  currentSupply: BigInt!
  maxSupply: BigInt!
  balances: [AssetBalance!]
  ownersCount: BigInt!
  royaltyReceiver: Account
  royaltyRate: Int!
  latestHiddenUriVersion: BigInt!
  latestPublicUriVersion: BigInt!
  latestPublicUri: String
  transactions: [Transaction!]!
  transactionsCount: BigInt!
  mintCount: BigInt!
  burnCount: BigInt!
  name: String
  type: String
  subtype: String
  tags: [Tag!]!
  tagsCount: Int!
  imageUri: String
}
```

</details>

<details>

<summary>Asset Balance</summary>

```
type AssetBalance @entity {
  id: ID!
  asset: Asset!
  owner: Account!
  amount: BigInt!
  parentContract: Content!
  type: String
  subtype: String
}
```

</details>

<details>

<summary>Tag</summary>

```
type Tag @entity {
  id: ID!
  contents: [Content!]
  assets: [Asset!]
}
```

</details>

<details>

<summary>Account</summary>

```
type Account @entity {
  id: ID!
  address: Bytes!
  assetBalances: [AssetBalance!]!
  transactions: [Transaction!]!
  transactionsCount: BigInt!
  transactionsAsOperator: [Transaction!]!
  transactionsAsOperatorCount: BigInt!
  mintCount: BigInt!
  burnCount: BigInt!
  uniqueAssetCount: BigInt!
  approvals: [Approval!]
  minters: [Minter!] 
  contentManagers: [ContentManager!]
  contents: [Content!]
}
```

</details>

<details>

<summary>Transaction</summary>

```
type Transaction @entity {
  id: ID!
  operator: Account!
  user: Account!
  transactionType: TransactionType!
  assets: [Asset!]! 
  assetAmounts: [TransactionAssetAmount!]!
  blockNumber: BigInt!
  timestamp: BigInt!
  gasUsed: BigInt!
  gasPrice: BigInt!
}
```

</details>

<details>

<summary>Transaction Asset Amount</summary>

```
type TransactionAssetAmount @entity {
  id: ID!
  asset: Asset!
  amount: BigInt!
}
```

</details>

<details>

<summary>Approval</summary>

```
type Approval @entity {
  id: ID!
  content: Content!
  operator: Account!
  user: Account!
}
```

</details>

<details>

<summary>Minter</summary>

```
type Minter @entity {
  id: ID!
  content: Content!
  operator: Account!
}
```

</details>

#### Enums

<details>

<summary>Transaction Type</summary>

```
enum TransactionType {
  Mint
  Burn
}
```

</details>


# Exchange Subgraph

The Exchange Subgraph contains indexed information about exchange, exchange volumes, asset volumes, the orders, developer royalties, etc.

### Exchange Optimistic Kovan GraphiQL&#x20;

{% embed url="<https://thegraph.com/hosted-service/subgraph/gcbsumid/exchange-optimistic-kovan>" %}
Try querying the Exchange Subgraph!
{% endembed %}

### Schemas

#### Entities

<details>

<summary>Exchange</summary>

```
type Exchange @entity {
  id: ID!
  orders: [Order!]!
  numOfOrders: BigInt!
  numOfBuyOrders: BigInt!
  numOfSellOrders: BigInt!
}
```

</details>

<details>

<summary>Token Escrow</summary>

```
type TokenEscrow @entity {
  id: ID!
  supportedTokens: [Token!]
}
```

</details>

<details>

<summary>Token</summary>

```
type Token @entity {
  id: ID!
  address: Bytes!
  escrow: TokenEscrow!
  totalVolume: BigInt!
  dailyData: [TokenDayData!]
}
```

</details>

<details>

<summary>Account</summary>

```
type Account @entity {
  id: ID!
  address: Bytes!
  orders: [Order!]!
  numOfOpenBuyOrders: BigInt!
  numOfOpenSellOrders: BigInt!
  numOfFilledOrders: BigInt!
  numOfCancelledOrders: BigInt!
  volume: BigInt!
  volumeAsBuyer: BigInt!
  volumeAsSeller: BigInt!
  dailyData: [AccountDayData!]
  claimedRoyalties: [UserRoyalty!]
}
```

</details>

<details>

<summary>User Royalty</summary>

```
type UserRoyalty @entity {
  id: ID!
  user: Account!
  token: Token!
  claimedAmount: BigInt!
}
```

</details>

<details>

<summary>Order</summary>

```
type Order @entity {
  id: ID!
  exchange: Exchange!
  asset: Asset!
  owner: Account!
  type: OrderType!
  price: BigInt!
  amountOrdered: BigInt!
  amountFilled: BigInt!
  status: OrderStatus!
  createdAtTimestamp: BigInt!
  filledAtTimestamp: BigInt!
  cancelledAtTimestamp: BigInt!
  lastClaimedAtTimestamp: BigInt!
  orderFills: [OrderFill!]
}
```

</details>

<details>

<summary>Order Fill</summary>

```
type OrderFill @entity {
  id: ID!
  filler: Account!
  order: Order!
  amount: BigInt!
  pricePerItem: BigInt!
  totalPrice: BigInt!
  token: Token!
}
```

</details>

<details>

<summary>Asset</summary>

```
type Asset @entity {
  id: ID!
  tokenId: BigInt!
  parentContract: Bytes!
  orders: [Order!] @derivedFrom(field: "asset")
  assetVolumeTransacted: BigInt!
}
```

</details>

<details>

<summary>Token Day Data</summary>

```
type TokenDayData @entity {
  id: ID!
  token: Token!
  volume: BigInt!
  startTimestamp: Int!
}
```

</details>

<details>

<summary>Account Day Data</summary>

```
type AccountDayData @entity {
  id: ID!
  account: Account!
  token: Token!
  volume: BigInt!
  volumeAsBuyer: BigInt!
  volumeAsSeller: BigInt!
  startTimestamp: Int!
}
```

</details>

#### Enums

<details>

<summary>Order Type</summary>

```
enum OrderType {
    Buy
    Sell
}
```

</details>

<details>

<summary>Order Status</summary>

```
enum OrderStatus {
  Ready
  PartiallyFilled
  Filled
  Cancelled
  Claimed
}
```

</details>


# RAWR Token

### Tokenomics

This contains all the information about the RAWR Token.

{% content-ref url="/pages/aUnsqnwRbEaAdaWZNW3O" %}
[Tokenomics](/governance/rawr-token/tokenomics)
{% endcontent-ref %}

### Contract Addresses

This contains contract addresses for the RAWR token on the deployed chains.

{% content-ref url="/pages/mpF4FEGhK6YHXJJIZ0yj" %}
[Contract Addresses](/governance/rawr-token/contract-addresses)
{% endcontent-ref %}


# Tokenomics

{% hint style="danger" %}
The information on this page is not final and is subject to change before the actual token launch announcement. This is only meant to give the user information regarding the current thoughts of the Rawrshak development team.
{% endhint %}

## What is $RAWR?

The $RAWR token is a governance and utility token for the Rawrshak platform. It gives all stakeholders on the platform the responsibility to help govern the direction of the Rawrshak platform and aligns their economic incentives. It gives all ecosystem users the ability to participate in the growth of the Rawrshak platform.

## Utility

The RAWR token has four main functions.

### 1. Governance

Rawrshak plans to launch a decentralized autonomous organization, the Rawrshak DAO, that will govern the project with the goal of reaching full decentralization in the future. The $RAWR token will be used in the RawrDAO's voting system. All platform stakeholders that own $RAWR tokens have voting rights and can participate in governance decisions. They must stake their tokens in order to vote and will receive staking emissions as governance rewards.

### 2. Incentives

The $RAWR token will be used to grow the ecosystem and incentivize gamers, content creators, and game developers to use the project. The Rawrshak DAO will sponsor events, fund games, and fund ecosystem projects that add value to the ecosystem using the $RAWR token. Rawrshak can partner with game developers to help incentivize gamers to increase liquidity of assets in the ecosystem through minting rewards and marketplace rewards.

$RAWR tokens will also be used to incentivize marketplace usage and increase volume.&#x20;

### 3. Platform Fees distribution

Platform fees that the Rawrshak ecosystem projects collect are distributed to the Rawrshak DAO treasury. It is up to the Rawrshak DAO on how to distribute this to the ecosystem either through funding events, games, or distributing them as part of the governance participation incentives.&#x20;

Currently, the only platform fee comes from the marketplace fees.&#x20;

### 4. Future on-chain mechanics

Future on-chain gaming mechanisms may require the use of RAWR tokens. Future Rawrshak projects that increase the RAWR token's utility include crafting, salvaging, lootboxing, DeFi-related partnerships, in-game advertisements, and content security mechanisms.

## Launch

$RAWR will be launched on the Ethereum network and will be implemented as an ERC20 token. The token contract will not be upgradable, and it will be stable. There will be no inflation. The goal is to have a relatively fair distribution mechanism.

The $RAWR token will be launched on Optimism first and tokens will be distributed there. We hope to later expand to Arbitrum and Polygon L2s.

## Allocation

A total of 100,000,000 $RAWR tokens will be minted.

* **70%** (70,000,000 RAWR) is allocated for the community, managed by the RawrDAO
  * The treasury will be allocated towards these goals:
    * Staking and governance participation
    * Marketplace and gaming system Incentives
    * Community growth incentives and community events(game developer, content creators, gamer acquisition)
    * Bug bounties
* **30%** (30,000,000 RAWR) is allocated to the development of the project.

## More Info

For more information, please refer to the $RAWR tokenomics litepaper:

{% embed url="<https://github.com/Rawrshak/Rawrshak-Litepaper/blob/main/RawrshakTokenomics.v.1.6.pdf>" %}
Tokenomics v.1.6
{% endembed %}


# Contract Addresses

The RAWR token is deployed on the following chains:

* Optimistic Kovan Testnet: [0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2](https://kovan-optimistic.etherscan.io/address/0x7c6b91d9be155a6db01f749217d76ff02a7227f2)


# Rawrshak DAO

{% hint style="danger" %}
The information on this page is not final and is subject to change before the actual token launch announcement. This is only meant to give the user information regarding the current thoughts of the Rawrshak development team.
{% endhint %}

The Rawrshak platform will be governed in a decentralized manner through the Rawrshak Decentralized Autonomous Organization (RawrDAO). This grants all stakeholders the opportunity to participate in the future of Rawrshak.

#### Responsibilities

* Researching, proposing, and implementing new platform projects and protocol upgrades
* Proposing and running community programs such as game jabs, artist competitions, competitive gaming tournaments, in-game asset bounties, etc.
* Funding teams, projects, and events
* Treasury management
* Game developer and ecosystem partnerships

### Structure

The structure for the RawrDAO is still under discussion. Please refer to the governance litepaper and governance research paper for more details.

#### Governance Litepaper

{% embed url="<https://github.com/Rawrshak/Rawrshak-Litepaper/blob/main/RawrshakGovernance.v.0.3.pdf>" %}

#### Governance Research&#x20;

{% embed url="<https://github.com/Rawrshak/Rawrshak-Litepaper/blob/main/RawrshakGovernanceResearch.v.0.1.pdf>" %}


