Giter Site home page Giter Site logo

eth-ecom's Introduction

Decentralised E-Commerce website made on Ethereum

Functionalities

  • Customer can buy an item by paying the amount in ether(or wei)
  • Admin can upload a new item by pasing the details (category, seller address, quantity ..etc)
  • Admin can view how much to pay to the seller of a pariculater item ID.
  • Admin can pay to the seller of a pariculater item ID.

Note

  • Arguments to upload a new item (by Admin) are -
      uint category -> 0 for Men, 1 for Women, 2 for Children 
      uint quantity -> Number of items
      address seller -> Ethereum address of the seller
      uint weiPerItem -> price (wei) per item
      string memory name -> Name of the item
      string memory description -> Description about the item
      string memory image -> URL of the item image

How To Run

  1. Clone this repository
  2. npm install
  3. touch .env
  4. Put your accounts private key (this account will be the admin) and your infura ribkeby url in the .env file (format given in env.copy file)
  5. cd ./frontend
  6. npm install
  7. cd ..
  8. Run the hardhat script that will deploy the contract using the command npx hardhat run --network rinkeby ./scripts/deploy.js
  9. The script will return the address of the deployed contract, copy that!
  10. Paste the contract address in the files frontend/src/App.js and frontend/src/Components/Admin.js in the variable contractAddress
  11. cd ./frontend
  12. npm start

eth-ecom's People

Contributors

alankrit-01 avatar

Stargazers

karsh avatar

Watchers

 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.