Consensys assignment.
npm install -g ganache-cli
npm install -g truffle
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.
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.