/NFT-Collection-Smart-Contract-LearnWeb3Dao

This contract allows the native NFt sales methods

Primary LanguageJavaScript

👩‍⚖️ CryptoDevs Smart Contract

🎛 The useCases of the smart contract

  1. The smart contract allows presale
  2. The smart contract allows postsale
  3. The baseURI function returns the json metadata for the Nft
  4. The contract allows only the owner or deployer of the contract to withdraw from the contract

🌌 what is an Nft metadata?

A Nft metadata looks like this
  {
     name:"Nft name",
     description:"Nft description",
     image:"Nft ipfsHash or base64Hash"
     attributes:[
      {value:"can be any value",
      trait__types:"coolness"
      }
     ]
  }

this is what the Nft data on opensea or rarible look like.

👩‍💻 Ways Which The Nft Metadata Can Be Hosted

  • On-Chain
  • Off-chain

🦒 On-Chain :

having your Nft metadata on-chain allows multiple possibilties some of the possibilites are which are the pros:

  • on-chain game devlopment
  • on-chain interaction

cons :

  • Gas expensive

🚀 Off-Chain :

having your Nft metadata on-chain allows multiple possibilties some of the possibilites are which are the pros:

  • Gas used is cheaper
  • Easy to write

cons :

  • no on-chain interaction with your Nft

👩‍💻 COMMANDS TO USE

  • To Compile the Contract
          yarn hardhat compile
  • To Clear the Compile Contract
yarn hardhat clean
  • To Deploy the Contract on hardhat
yarn hardhat run scripts/<scripts file name>
  • To Deploy the contract to a testnet
yarn hardhat run scripts/<scripts file name> --network <network name> 
  • To Run Test on hardhat
yarn hardhat test
  • To Run Test on a particular network
yarn hardhat test --network <network name> 
  • To Run a paricular Test
 yarn hardhat test --grep <name of the test in quote>
  • To Run a Specific Test on a Particular Network
yarn hardhat test --grep <name of the test in quote>  --network <network name> 
   The preffered networks can be found in the hardhat config file

📱 Contact

  • Phone number - +2348134570701
  • Twitter - ken_okha
  • BlockChain developer