Skip to content

ulhaqFaizan/NFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

NFT Minting Project

This project allows users to mint and manage NFTs (Non-Fungible Tokens) using a simple web interface and a custom Ethereum smart contract.

Project Structure

  • index.html: Frontend interface for connecting wallets and minting NFTs
  • NFT.sol: Solidity smart contract for the NFT implementation

Smart Contract: Faizan (FZN)

The Faizan contract (NFT.sol) is an ERC721 compliant smart contract that allows for the creation and management of unique tokens. It uses OpenZeppelin's libraries for secure and standard-compliant implementation.

Features:

  • ERC721 compliant
  • Ability to mint new tokens with associated metadata
  • Ownership control for minting operations

Frontend Interface

The project includes a basic HTML frontend (index.html) that provides the following functionality:

  • Connect to an Ethereum wallet
  • Display the connected wallet address
  • Input field for recipient address
  • Input field for metadata URL
  • Button to mint a new NFT
  • Display area for owned NFTs

Metadata URL

The metadata URL is a crucial component of NFT creation. It points to a JSON file that contains information about the NFT, including its name, description, and image URL. Here's how to create and use a metadata URL:

  1. Create a JSON file with the following structure:

    {
      "name": "My NFT Name",
      "description": "Description of my awesome NFT",
      "image": "https://example.com/path/to/image.png",
      "attributes": [
        {
          "trait_type": "Color",
          "value": "Blue"
        },
        {
          "trait_type": "Shape",
          "value": "Circle"
        }
      ]
    }
  2. Host this JSON file on a publicly accessible server. You can use services like:

    • IPFS (InterPlanetary File System): A decentralized storage system
    • GitHub Gist: For quick, small-scale hosting
    • Any web server you control
  3. Use the URL of this hosted JSON file as the metadata URL when minting your NFT.

For example, if you've uploaded your JSON to IPFS, your metadata URL might look like: https://ipfs.io/ipfs/QmX... (where QmX... is the IPFS hash of your JSON file)

Remember: Once an NFT is minted, its metadata typically cannot be changed, so ensure all information is correct before minting.

Getting Started

  1. Deploy the Faizan smart contract to an Ethereum network of your choice.
  2. Update the frontend code to interact with the deployed contract address.
  3. Host the index.html file on a web server.
  4. Prepare your NFT metadata and host it at a publicly accessible URL.
  5. Access the webpage and connect your Ethereum wallet.
  6. Use the interface to mint new NFTs by providing a recipient address and the metadata URL.

Requirements

  • Ethereum wallet (e.g., MetaMask)
  • Web3 provider
  • Solidity ^0.8.9
  • OpenZeppelin contracts

Security

This project uses OpenZeppelin's audited contracts as a base, which provides a good foundation for security. However, always ensure to:

  • Conduct a thorough security audit before deploying to mainnet
  • Keep private keys and sensitive information secure
  • Understand the implications of onlyOwner functions

License

This project is licensed under the MIT License.

Disclaimer

This is a basic implementation and should not be used in production without proper auditing and testing. The creators are not responsible for any loss of funds or other issues that may arise from using this code.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors