Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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`.
- Host: GitHub
- URL: https://github.com/sweetmantech/onchain-music-metadata
- Owner: SweetmanTech
- License: mit
- Created: 2022-07-29T09:53:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-31T00:06:32.000Z (over 2 years ago)
- Last Synced: 2024-10-14T11:38:58.312Z (25 days ago)
- Topics: metadata, music, nft, onchain
- Language: Solidity
- Homepage: https://www.npmjs.com/package/onchain-music-metadata
- Size: 475 KB
- Stars: 25
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.
```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).### 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.