Giter Club home page Giter Club logo

fake-product-identification's Introduction

Fake Product Identification using Blockchain

Packages Required:-

  • Truffle v5.6.7 (core: 5.6.7)
  • Ganache v7.5.0
  • Solidity v0.5.16 (solc-js)
  • Node v15.8.0
  • Web3.js v1.7.4
  • npm 7.5.1

Other Requirements:-

  1. Any chromium based browser i.e. Chrome
  2. Metamask browser extension

setup process

  1. Clone the project
git clone https://github.com/A4ANK/Fake-Product-Identification.git
  1. Go to the project folder, open terminal there and run following command to install required node_modules:-
npm install
  1. Compile contract source files. (Compilation and deployment can be done using truffle migrate):-
truffle compile
  1. Open Ganache, (to setup local blockchain)
    • crerate new workspace
    • add truffle-config.js in truffle project
    • change port to 7545 in server settings (same as port in truffle-config.js)
  2. In chrome, open metamask
    • add new test network using
      • NETWORK ID (i.e. 5777 ,from Ganache Server settings)
      • RPC SERVER (i.e HTTP://127.0.0.1:8545 ,from Ganache Server settings)
      • CHAIN CODE (i.e. 1337)
    • import account using private key of any account from local blockchain available in Ganache.
  3. In terminal, run following commands:-
  • Run migrations to deploy contracts.
truffle migrate
  • To start a server and it will open a homepage (index.html) file in the default browser.
npm run dev 
  1. Login to metamask ,and connect the added account to local blockchain (i.e.localhost:3000)
  2. Interact with website

fake-product-identification's People

Contributors

a4ank avatar

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.