# Welcome

You've entered the dojo of cXc

We love empowering creators, with [media standards](https://standards.cxc.world), NFT maps, and more. \
\
Here, we're adding all the information you need.

<figure><img src="https://2519306540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV1ORJT16Dy4SeGDI9BkP%2Fuploads%2FYHEzCTI6APlI3XnSWPA5%2FCXC-Logo-Split-Circle-X-Wht.png?alt=media&amp;token=ac4c3abc-65a6-41e8-8d80-bb97cf065286" alt=""><figcaption><p>The OG cXc Logo</p></figcaption></figure>

## The Latest

## 👨‍🎤 Experience [cXc.world 🌎](https://cxc.world/) <a href="#id-7927" id="id-7927"></a>

## 🤝 Get to know [🟣 Purple](/) <a href="#a59d" id="a59d"></a>

## 🎥 [Add Music to cXc.world](https://www.youtube.com/watch?v=7NCaG2ZPHOQ) <a href="#c9d1" id="c9d1"></a>

## 🗺 [Music NFT Map](https://cxc.world/?format=nft) <a href="#id-255e" id="id-255e"></a>


# Media NFTs on WAX

Mint your own!

We started with a map of music NFTs

## Experience it!  🗺 [Music NFT Map](https://cxc.world/?format=nft) <a href="#id-255e" id="id-255e"></a>

\
Learn about all the NFT options: [standards.cxc.world](https://standards.cxc.world)

{% embed url="<https://www.youtube.com/watch?v=0jLRFa8Ol5Y&list=PLrr_9HPPROSf-OLfNfDmxTOsdhakJJPhQ>" %}


# cXc Music NFT Standard

Version: 1.0.0 Total Fields: 24 by: cXc.world

### NEW : We have published more standards + moved the documentation to [standards.cxc.world](https://standards.cxc.world)

Watch the [Instructional Video](https://www.youtube.com/watch?v=k0vt8v5iIn4) on creating your Music NFT on WAX

> There's also written instructions below

## About this standard

The cXc Music NFT Standard works with the [Atomichub](https://wax.atomichub.io/) and [Neftyblocks](https://neftyblocks.com/) to help any individual, collection, or application to make their own music NFT project.

This standard is a schema (more recently called "category" on atomichub.io) which allows you to make templates for Music NFTs.

The benefits of using this schema include forward compatibility (Geotags) getting artists plays that pay with traditional platform players, credits, links, and more.

**There's no coding required.** But you'll see the code below ready for changes if you'd rather exclude traditional players, or add extra audio fields. You can even [make a music NFT from your phone.](https://www.youtube.com/watch?v=k0vt8v5iIn4)

This Schema exists within Atomic Asset's [NFT standard](https://github.com/pinknetworkx/atomicassets-contract) on the [atomicassets contract](https://wax.bloks.io/account/atomicassets).

Feel free to use or modify this schema for any purposes in accordance with the license.

### Check out our NFT collection using this standard [here](https://drops.cxc.world/)

## Summary 🗞️

This standard includes:

Name of the NFT (Can be different than track title)

One audio field\
One video field\
Four images \[Main, Back, Collection and Promo]\
One clip that can be anything used for a preview or extra media field of any type

Title \[If different than name]\
Album name\
Track # \[If it's just one track]

Any number of custom credits\
Any number of custom platform links

ISO Country code\
Readable locale\
Geotag as GeoJson Point

License\
Rarity

## Technical Summary ⚙️

All media fields use IPFS. Fields labeled `image` can be uploaded through Atomichub.com. [Pinata](https://www.pinata.cloud/) is an option to host files with IPFD with a free tier.

All other info fields are strings (except "track" is int64)

`year` is also a string in case there's a more accurate date desired or a range of years.

*Rarity* is filterable on many NFT marketplaces

License is for codes like "CC-BY", or can be used to declare a priviledge granted upon receiving NFT.

### Geo 🌍

ISO country codes should follow ISO 3166-1 alpha-3 (USA, COL, etc)

Locale string intended to be used in this format "City, County, State" or corresponding values for a given locality

geotag is a GeoJson point stored as a string

|   Field name  |  Type  | Description                                                                                                                                      |
| :-----------: | :----: | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|      name     | string | NFT name                                                                                                                                         |
|      img      |  image | Primary image / Cover image                                                                                                                      |
|     audio     |  audio | Audio file IPFS hash                                                                                                                             |
|     video     |  video | Music video file IPFS hash                                                                                                                       |
|      clip     |  video | Additional video file IPFS hash                                                                                                                  |
|    backimg    |  image | Back cover of album / single                                                                                                                     |
|     promo     |  ipfs  | Extra image or video for promo poster, QR code, etc                                                                                              |
| collectionimg |  image | Extra image for Collection, optional                                                                                                             |
|     artist    | string | The artist, if you prefer a separate field to putting with other credits                                                                         |
|     title     | string | The actual title of the track                                                                                                                    |
|     album     | string | Title of the album                                                                                                                               |
|     track     |  int64 | Number of the track on the album                                                                                                                 |
|    released   | string | Date first released                                                                                                                              |
|     about     | string | Description field with info about                                                                                                                |
|    credits    | string | Array of song credits                                                                                                                            |
|    youtube    | string | Youtube URL                                                                                                                                      |
|    spotify    | string | Spotify URL                                                                                                                                      |
|   soundcloud  | string | Soundcloud URL                                                                                                                                   |
|   platforms   | string | A list of all platforms the music can be found, and socials if desired                                                                           |
|     nation    | string | Three-letter ISO (USA, BRA, AUS, etc)                                                                                                            |
|     locale    | string | Local locales (State, County, City in USA)                                                                                                       |
|     geotag    | string | GeoJSON Point stored as string, format "lat,lng" (e.g., "37.7749,-122.4194"), or a "\[lat,lng]" coordinate array (e.g., "\[37.7749, -122.4194]") |
|    license    | string | Declare license, (Copyright, CC0, MIT, etc)                                                                                                      |
|     rarity    | string | How scarce is this NFT? Abundant Common Uncommon Rare Epic Mythic Unique                                                                         |

## To use the cXc Music NFT Standard

First, you'll need a collection.

> If you're new, follow [this guide](https://nftnewstoday.com/2023/04/24/the-ultimate-guide-to-atomichub-nfts-trading-and-more/) for more info.

To add a Music NFT schema to your collection, you may:

1. Manually re-create the schema from the UI (Remember schema is called 'category' on atomichub) by adding each field in the table above. This is 'the long way'

or, do it almost instantly by:

2. Copy the code below using the copy icon in the top-right of the code. Paste the following array into the `idata` field using the Atomic Assets [createschema](https://waxblock.io/account/atomicassets?action=createschema#contract-actions) action to create your own schema on Atomic Assets, and then create template from the schema for each NFT you release via Atomichub or Neftyblocks.

> ℹ️ Important

Using this schema does NOT mean that each template (or NFT) must have every field filled, but you can only choose from fields in your future templates. You may add fields to the schema later, but not remove them. New fields will appear at the end (ugly), thus, best to modify this standard to your needs before deploying.

## cXc Music Schema 🎸

> Merged with Simple version (This is the Simple Version) Works with Atomichub UI out of the box. You can even avoid touching this code by using Create Schema on atomichub to replicate.

```javascript
[
  {
    "name": "name",
    "type": "string"
  },
  {
    "name": "img",
    "type": "string"
  },
  {
    "name": "audio",
    "type": "ipfs"
  },
  {
    "name": "video",
    "type": "ipfs"
  },
  {
    "name": "clip",
    "type": "ipfs"
  },
  {
    "name": "backimg",
    "type": "image"
  },
  {
    "name": "promo",
    "type": "image"
  },
  {
    "name": "collectionimg",
    "type": "image"
  },
  {
    "name": "artist",
    "type": "string"
  },
  {
    "name": "title",
    "type": "string"
  },
  {
    "name": "album",
    "type": "string"
  },
  {
    "name": "track",
    "type": "int64"
  },
  {
    "name": "released",
    "type": "string"
  },
  {
    "name": "about",
    "type": "string"
  },
  {
    "name": "credits",
    "type": "string"
  },
  {
    "name": "youtube",
    "type": "string"
  },
  {
    "name": "spotify",
    "type": "string"
  },
  {
    "name": "soundcloud",
    "type": "string"
  },
  {
    "name": "platforms",
    "type": "string"
  },
  {
    "name": "nation",
    "type": "string"
  },
  {
    "name": "locale",
    "type": "string"
  },
  {
    "name": "geotag",
    "type": "string"
  },
  {
    "name": "license",
    "type": "string"
  },
  {
    "name": "rarity",
    "type": "string"
  }
]
```

## Create a Template 🛠️ 🖼️.

Once you have your schema in place, use it to drop your own Music NFTs using tools like [Atomichub](https://wax.atomichub.io/) and [Neftyblocks](https://neftyblocks.com/).

## Modify this schema 🛠️

The power is in your hands! You can add, remove, or change fields when making your own schema.

Ideas:

**Artist** - If you'd rather have your name here than in credits\
**Multiple Audio fields** - Duplicate the audio fields to include all songs on an album (DYOR on marketplace support)\
**Metadata** - Add custom metadata like the key, BPM, time, whatever you want

If you'd rather include all of your links in the Platform field, you can remove the Spotify, Soundcloud, and Youtube field.

Removing Youtube will also disable Youtube player from showing up on Atomichub and likely other marketplaces.

## Power of the Schema ✨ 🧙‍♂️

Using this template ensures maximum forward-compatibility with [music.cXc.world](https://music.cxc.world)

There is no magical benefit (yet) of using this standard, just practical ones. Youtube plays can bring extra revenue, as will the links to other players. You may credit all involved, and geographic data opens up new use cases for your NFT.

In the future it's possible a mapp / dapp (like cXc) to allow users to register their own schemas that adhere to this standard, creating a Music-NFT exclusive platform that doesn't rely on accounts or collection names alone.

## Evolution of the Schema 🚀 🛸

This schema will grow and evolve. Feel free to open issues on this repo with your suggestions.

If you translate to another blockchain or NFT standard, please send a pull request adding a file named .md in the main directory containing the code needed to deploy, or open an issue with the code and I can update the repo if you prefer.

## Mini Change Log

### 1.0.0

Changed `year` to `released` Changed types to better work with atomichub's UI Improved explanation + added image

### 0.1.4

Added Additional `clip` and img fields Changed `promo` description to suggest video + image Merged Simple version, made Simple the only option. To use old version, change string to string\[] and use. This isn't recommended as there's little benefit and it's not working well through the Atomichub website

### 0.1.3

Added `artist`, `year`, and `collectionimg`

### 0.1.2

Added `rarity` and `license`

### 0.1.1

Added `track` and `album`

\~ Created with 💜 by [cXc.world](https://cxc.world/f/nft) \~<br>

Improvements to this standard were made possible by [Wax Labs](https://labs.wax.io/)


# Quick Loot

Earn for your NFTs +  earn with friends

### 🌟 Registering for Rewards as a User

For users looking to stake their NFTs and earn rewards, here's a straightforward guide:

#### Step 1: Registration 🖐&#x20;

* **Action**: `regnewuser`
* **Purpose**: Registers you on the contract, making you eligible to stake NFTs and claim rewards.
* **Note**: If you have a referrer, including their name during registration could increase your reward potential. You get 1 point for each person you refer, and for each person they refer. You also get a point for being referred when first signing up.&#x20;

#### Step 2: Staking NFTs 🖼

* **Action**: Transfer NFTs to the contract account.
* **Requirement**: Ensure the NFTs belong to a registered and eligible template within the collection.
* **Tip**: No need for a memo; the contract recognizes eligible NFTs and stakes them automatically. A collection owner must enable their stakability.&#x20;

#### Step 3: Claiming Rewards 💰

* **Action**: `claim`
* **Frequency**: you claim by collection Multipliers for referrals as well as number of NFT staked booster rewards for impassioned collectors.&#x20;

#### Step 4: Unstaking NFTs 🤗

* **Action**: `unstake`
* **Flexibility**: Unstake your NFTs anytime past the unstake period set by the collection owner.

#### Step 5: Referrals and Bonus 👋

* Engage in the referral program (if available) by referring new users to boost your rewards further. Tell them to register, and put yu as the name. Teach them to buy + stake NFTs, and invite more people

####


# For Collection Admins

⚡️ Engaging your collectors

### 🌞 Setting Up Rewards for Collection Owners

To set up NFT staking rewards for your collection, follow these steps:

* Step 1: **Register as a User:** Call `regnewuser` to register yourself on the contract if not already registered.
* Step 2: **Register Your Collection**: Use `setnftcolrew` to register your collection with its reward parameters and time unit settings.
* Step 3: **Add Eligible NFT Templates**: Call `addtemplates` to define which templates in your collection can be staked for rewards.
* Step 4: **Fund the Contract**: Transfer the designated reward tokens to the contract with a `memo` stating your collection name, establishing a `bank` for rewards.
* Step 5: **Optional - Manage Templates**: Adjust eligible templates or remove them as needed with `addtemplates` or `rmtemplates`. Read below for important info.
* Step 6: **Communicate with Your Community**: Inform your community about the staking process, rewards, and any changes to ensure transparency and engagement.


# Contract

Documentation for contract actions

<figure><img src="https://2519306540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV1ORJT16Dy4SeGDI9BkP%2Fuploads%2FDyo38fouEkaWA3DuKkMh%2FScreen%20Shot%202024-01-30%20at%203.37.09%20PM.png?alt=media&amp;token=5cc2eb33-fd62-4584-89d2-b99e30e0ab64" alt=""><figcaption><p>Main</p></figcaption></figure>

[Github](https://github.com/currentxchange/loot)

### Loot Contract Actions

#### 📝 User Registration (`regnewuser`)

* **Purpose**: Registers a user on the contract, enabling participation in NFT staking and rewards.
* **Parameters**:
  * `user`: Account name to be registered.
  * `referrer`: (Optional) Account name of the referrer, if any.

#### 💰 Claiming Rewards (`claim`)

* **Purpose**: Allows users to claim accumulated rewards from staked NFTs.
* **Parameters**:
  * `user`: Account name claiming the rewards.
  * `collection`: Name of the NFT collection from which to claim rewards.

#### 🔄 Unstaking NFTs (`unstake`)

* **Purpose**: Enables users to remove their NFTs from staking, halting reward accumulation.
* **Parameters**:
  * `user`: Account name performing the unstake action.
  * `asset_ids`: List of NFT asset IDs to be unstaked.

#### 🔄 Resetting User Data (`resetuser`)

* **Purpose**: Clears a user's staking data and returns any staked NFTs.
* **Parameters**:
  * `user`: Account name whose data is to be reset.

#### 💸 Refunding Tokens (`refund`)

* **Purpose**: Issues a refund of tokens to a user under specific conditions.
* **Parameters**:
  * `user`: Recipient of the refund.
  * `collection`: Collection associated with the refund.
  * `refund_amount`: Amount of tokens to be refunded.

#### 🌐 Registering NFT Collection (`setnftcolrew`)

* **Purpose**: Sets up a new NFT collection for staking with specific reward parameters.
* **Parameters**:
  * `user`: Account initiating the registration.
  * `collection`: Collection name.
  * `token_symbol`: Token symbol for rewards.
  * `token_contract`: Contract managing the reward tokens.
  * `time_unit_length`: Length of time units for reward calculation.
  * `unstake_period`: Minimum staking period before NFTs can be unstaked.
  * `reward_series_referral`: Series for calculating referral rewards.
  * `reward_coefficient_referral`: Coefficient for referral reward calculation.
  * `reward_series_hodl`: Series for calculating holding rewards.
  * `reward_coefficient_hodl`: Coefficient for holding reward calculation.

#### ➕ Adding Eligible NFT Templates (`addtemplates`)

* **Purpose**: Includes NFT templates in the staking program of a collection.
* **Parameters**:
  * `user`: Account adding the templates.
  * `template_id`: ID of the template to be added.
  * `collection`: Collection to which the template belongs.
  * `timeunit_rate`: Reward rate per time unit for the template.

#### ➖ Removing NFT Templates (`rmtemplates`)

* **Purpose**: Excludes NFT templates from the staking program of a collection.
* **Parameters**:
  * `user`: Account removing the templates.
  * `template_id`: ID of the template to be removed.
  * `collection`: Collection from which the template is removed.

#### 🔔 Receiving NFTs (`receiveassets`)

* **Purpose**: Automatically stakes NFTs sent to the contract and updates user staking data.
* **Parameters**:
  * Handled through `atomicassets::transfer` notifications; no direct user parameters.

#### 📈 Handling Token Transfers (`on_transfer`)

* **Purpose**: Manages incoming token transfers to fund the contract's reward pool.
* **Parameters**:
  * Handled through token `transfer` notifications; the memo should contain the collection name.

<br>


