Fair Trade Coffee
A dApp implementing a coffee supply chain, to verify the authenticity and improve trackability of a coffee bean, from farm to consumer.
Contracts
Environment
Truffle v5.1.24 (core: 5.1.24)
Solidity v0.5.16 (solc-js)
Node v13.8.0
Web3.js v1.2.1
Libraries used
This contract implements an access control inheritance strucutre, to ensure only the authorized players may execute function that modify the state of the coffee bean throughout it's lifecycle.
The Roles library ensures that only particular roles can perform these actions.
Setup Instructions
This project uses truffle so please ensure you have it installed
npm i truffle - g
then
cd fair-trade-coffeee && truffle develop
This will get the local ethereum node up and running, in another terminal:
cd app/ && npm run dev
To run the front end. Ensure your Wallet is connected to http://localhost:9545
.
Test
To run tests simply:
-
truffle develop
-
compile
-
migrate
-
test