/WarrantyNFT

Primary LanguageJavaScriptMIT LicenseMIT

Team - Furious

Topic - Blockchain-based eCommerce warranty system using NFTs

The objective is to replace the physical warranty and have block chain based warranty using NFT which will ensure authenticity and security.

  • Converting ownership authenticity and product warranty cards into decaying NFTs.
  • For instance, allow brands and retailers to introduce an NFT for each of their products, which allows customers to receive the physical product along with a digital version of it.
  • Customers can then use the digital NFT to verify the authenticity of their product, prove their ownership of their product, and transfer ownership of them upon resale.
  • The brand/retailer should also be able to tie the digital NFT to its warranty program, allowing owners to track repairs and replacements to the original item.
  • Decay the NFT once the warranty is over.
  • Using the Polygon blockchain to deploy our solution.

Technology Stack & Tools

  • Solidity (Writing Smart Contract)
  • Javascript (React & Testing)
  • Ethers (Blockchain Interaction)
  • Hardhat (Development Framework)
  • Ipfs (Metadata storage)
  • React routers (Navigational components)

Requirements For Initial Setup

  • Install NodeJS, should work with any node version below 16.5.0
  • Install Hardhat

Setting Up

1. Clone/Download the Repository

2. Install Dependencies:

$ cd BlockchainWarranty
$ npm install

3. Boot up local development blockchain

$ cd BlockchainWarranty
$ npx hardhat node

4. Connect development blockchain accounts to Metamask

  • Copy private key of the addresses and import to Metamask
  • Connect your metamask to hardhat blockchain.
  • If you have not added hardhat to the list of networks on your metamask, open up a browser, click the fox icon, then click the top center dropdown button that lists all the available networks then click add networks. A form should pop up. For the "Network Name" field enter "Hardhat".Enter "New RPC URL" and chain ID and click save.

5. Migrate Smart Contracts

npx hardhat run src/backend/scripts/deploy.js --network localhost

6. To Run Frontend

$ npm start