Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sweetmantech/onchain-music-metadata

On-Chain Music Metadata for music NFTs. NPM package with `npm i onchain-music-metadata`.
https://github.com/sweetmantech/onchain-music-metadata

metadata music nft onchain

Last synced: about 13 hours ago
JSON representation

On-Chain Music Metadata for music NFTs. NPM package with `npm i onchain-music-metadata`.

Awesome Lists containing this project

README

        

# Music NFT OnChain Metadata

Standard for musicians pioneered by [Catalog](https://beta.catalog.works/) & [Mint Songs](https://zora.co/collections/0x2B5426A5B98a3E366230ebA9f95a24f09Ae4a584/93).

- 73 Music NFT attributes stored on chain in your music nft metadata.
Screen Shot 2022-07-30 at 8 59 39 PM

```diff
- WARNING: these contracts are unaudited
```

### You Newest Tool for Music NFTs (100% on chain)

- [Your Music NFT Smart Contract (ERC721)](https://mumbai.polygonscan.com/address/0xb7CF570F9a816CEB90b780C324ECcdb6Fa6C722F#code).
- [Your Music NFT in OpenSea](https://testnets.opensea.io/assets/mumbai/0xb7CF570F9a816CEB90b780C324ECcdb6Fa6C722F/1)
- Works out of the box.
- 100% free CC0 technology (MIT License - use this w/o crediting me).

Screen Shot 2022-07-30 at 9 00 55 PM

### Get Started

To add music NFT metadata to your next music NFT drop, just

1. `npm i onchain-music-metadata`
2. `import "onchain-music-metadata/contracts/OnChainMusicMetadata.sol";`
3. `contract MyMusic is OnChainMusicMetadata`
4. use the `musicTokenUri(tokenId)` method freely.

### Example Music NFT:

```
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.15;

import "onchain-music-metadata/contracts/Example/ExampleToken.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";

contract MusicNFT is ERC721, ExampleToken {
uint256 songId;

constructor() ERC721("music nft", "mnft") {
songId = 0;
setupSongMetadata();
setupProjectMetadata();
}

function mint() public {
songId++;
_mint(msg.sender, songId);
}

function tokenURI(uint256 _tokenId)
public
view
virtual
override(ERC721)
returns (string memory)
{
require(_exists(_tokenId), "tokenId doesn't exist");
return musicTokenUri(_tokenId);
}
}
```

### Credits:

- [DanielAbalde/NFT-On-Chain-Metadata](https://github.com/DanielAbalde/NFT-On-Chain-Metadata)
- [Zora Editions](https://github.com/ourzora/zora-drops-contracts/blob/main/src/metadata/EditionMetadataRenderer.sol)
- [Nouns DAO #177](https://nouns.wtf/)

### More info

Checkout our [Github](https://github.com/SweetmanTech/Onchain-Music-Metadata) for the latest changes.