Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ishinzoo/music-nft
MusicBlock is an ERC-721 compliant NFT smart contract built using Solidity. The contract allows users to mint unique MusicBlock NFTs with metadata stored on IPFS. It leverages OpenZeppelin’s libraries for security and standardized functionality.
https://github.com/ishinzoo/music-nft
etherscan ipfs metadata openzeppelin smart-contracts solidity
Last synced: 3 days ago
JSON representation
MusicBlock is an ERC-721 compliant NFT smart contract built using Solidity. The contract allows users to mint unique MusicBlock NFTs with metadata stored on IPFS. It leverages OpenZeppelin’s libraries for security and standardized functionality.
- Host: GitHub
- URL: https://github.com/ishinzoo/music-nft
- Owner: iShinzoo
- Created: 2024-12-23T12:15:12.000Z (3 days ago)
- Default Branch: main
- Last Pushed: 2024-12-23T14:33:03.000Z (3 days ago)
- Last Synced: 2024-12-23T15:32:09.567Z (3 days ago)
- Topics: etherscan, ipfs, metadata, openzeppelin, smart-contracts, solidity
- Language: Solidity
- Homepage:
- Size: 447 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MusicBlock NFT Smart Contract
## Overview
MusicBlock is an ERC-721 compliant NFT smart contract built using Solidity. The contract allows users to mint unique MusicBlock NFTs with metadata stored on IPFS. It leverages OpenZeppelin’s libraries for security and standardized functionality.
## Features
* ERC-721 Compliance: Implements the ERC-721 standard for non-fungible tokens.
* Token URI Storage: Supports custom metadata for each token using the ERC721URIStorage extension.
* IPFS Integration: Base URI is set to point to IPFS for decentralized metadata storage.
* Safe Minting: Ensures tokens are securely minted to the user's wallet.
*** Checkout NFT from here 👇***
[Click Me !](https://testnets.opensea.io/collection/musicblock-8)
## Prerequisites
* Node.js: Required for interacting with Ethereum blockchain.
* Hardhat: For local development and testing.
* MetaMask: Wallet for interacting with the contract on supported networks.
* IPFS: For hosting metadata files.
## Technologies Used
* Solidity (v0.8.22): Smart contract programming language.
* OpenZeppelin: Industry-standard library for secure and modular smart contracts.
* Ethereum: Blockchain for deploying and interacting with the smart contract.
## Contract Details
### Contract Name
* MusicNFT
### Symbol
* MBC
## Functions
* mintNFT() -
Mints a new NFT to the caller's address.
Automatically increments the token ID for each new token.* _baseURI() -
Returns the base URI for token metadata.
Overridden to provide a custom base URI.* tokenURI(uint256 tokenId) -
Returns the metadata URI for a specific token ID.
Ensures the token exists before providing the URI.## Dependencies
```
@openzeppelin/contracts/token/ERC721/ERC721.sol
@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol
@openzeppelin/contracts/utils/Counters.sol
```## Setup and Deployment
Step 1: Clone the Repository
```
git clone
cd
```Step 2: Install Dependencies
```
npm install
```Step 3: Compile the Contract
```
npx hardhat compile
```Step 4: Deploy the Contract
Update the deployment script with your desired network configuration.
Deploy the contract:
```
npx hardhat run scripts/deploy.js --network
```Step 5: Interact with the Contract
Use a tool like Hardhat Console or Ethers.js to interact with the deployed contract. Example:
```
const contract = await ethers.getContractAt("MusicNFT", "");
await contract.mintNFT();
```## License
This project is licensed under the MIT License. See the LICENSE file for details.
## Acknowledgments
* OpenZeppelin Contracts
* Hardhat
## Contact
For questions or support, please contact:
Email: [email protected]