Skip to content

den0xR/consensys-assignment

Repository files navigation

Decentralized Marketplace (Solidity)

Consensys assignment.

Requirements

npm install -g ganache-cli
npm install -g truffle

Getting Started

  • ganache-cli
  • truffle compile
  • truffle migrate
  • npm i
  • npm start

Open localhost:3000.

First address will be assigned to admin role.
Add a store owner.
Changing the account to store owner will redirect to store management page.
Add a store. Add a product to that store.
Change to another account - shopper acocunt --> the one that's not assigned yet.
Should be redirected automatically to page with shops.

Testing

  • truffle test

Following user stories are covered with tests:

  • Marketplace owner and admins should be able to manage admins and store owners
  • Admin should be able to manage stores and products inventory
  • Regular users should be able to buy products
  • Store owner should be able to withdraw balance from his store
  • Contract owner should be able to pause the contract in emergency

I tried to cover as many guard checks as possible.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published