Code Monkey home page Code Monkey logo

chainstacklabs / music-nft-minter-tutorial-repo Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 3.59 MB

This project contains all tutorial files from the How to mint a music NFT: Dropping fire tunes with Chainstack IPFS Storage tutorial, originally published on the Chainstack Developer Portal: Web3 [De]Coded.

Home Page: https://docs.chainstack.com/docs/how-to-mint-music-nft-with-chainstack-ipfs-storage/

License: MIT License

Solidity 6.62% JavaScript 93.38%
ipfs ipfs-api nft nft-generator nfts smartcontract

music-nft-minter-tutorial-repo's Introduction

Labs

Chainstack is the leading suite of services connecting developers with Web3 infrastructure

         

HomepageSupported protocolsChainstack blogChainstack docsBlockchain API reference
Start for free

Music NFT minter tutorial using with dotenv-vault

This project contains all tutorial files from the How to mint a music NFT: Dropping fire tunes with Chainstack IPFS Storage tutorial, originally published on the Chainstack Developer Portal: Web3 [De]Coded.

Project details

This repository contains scripts and contracts needed to create a new wallet, check its balance, compile an NFT contract, and mint music NFTs using pre-set metadata on the Ethereum network with Chainstack IPFS Storage, Hardhat and Web3js.

Outcomes

Dependencies

Usage

  1. Clone or fork this repo to a preferred location by running in CLI:
git clone https://github.com/chainstacklabs/music-nft-minter-tutorial-repo.git  
  1. Install dependencies by running in CLI:
npm ci  
  1. Rename .env.sample to .env and fill in your endpoint URLs for each network, then your Chainstack and Etherscan API keys:
GOERLI="https://your-goerli-endpoint-here"
SEPOLIA="https://your-sepolia-endpoint-here"
MAINNET="https://your-mainnet-endpoint-here"
CHAINSTACK="Bearer y0urChainstackAPIkeyHer3"
ETHERSCAN="Y0URETHERSCANAPIKEYHER3"
  1. Generate a new wallet address key pair and fund it from the Chainstack $NETWORK faucet by running in CLI:
npx hardhat run scripts/wallet.js --network $NETWORK  
  1. Check wallet balance by running in CLI:
npx hardhat run scripts/balance.js --network $NETWORK  
  1. Deploy the NFT minter smart contract from the ABI & BIN files by running in CLI:
npx hardhat run scripts/deploy.js --network $NETWORK  
  1. Pin all media files and JSON metadata with Chainstack IPFS Storage by running in CLI:
npx hardhat run scripts/pin.js  
  1. Mint an NFT with the metadata from the pinned JSON file by running in CLI:
npx hardhat run scripts/mint.js --network $NETWORK  

Files

  • .env.sample - Sample Dotenv file containing pre-formatted slots needed for key script variables
  • contracts/MyFirstMusicNFT.sol - Smart contract supporting functions to mint NFTs with custom tokenURI
  • src/ - Sample media files and metadata JSON you can use to test minting
  • scripts/wallet.js - Script to generate a wallet address and key pair
  • scripts/balance.js - Script to check the balance of a wallet address
  • scripts/deploy.js - Script to deploy the NFT minter smart contract from the ABI & BIN files
  • scripts/pin.js - Script to pin relevant media files and JSON metadata with Chainstack IPFS Storage
  • scripts/mint.js - Script to mint an NFT with the metadata from pinned JSON metadata file

music-nft-minter-tutorial-repo's People

Contributors

petarsrepo avatar soos3d avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

edwinliavaa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.