Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maschad/fair-trade-coffeee
Ethereum DApp that demonstrates a Supply Chain flow between a Seller and Buyer
https://github.com/maschad/fair-trade-coffeee
ethereum solidity
Last synced: 16 days ago
JSON representation
Ethereum DApp that demonstrates a Supply Chain flow between a Seller and Buyer
- Host: GitHub
- URL: https://github.com/maschad/fair-trade-coffeee
- Owner: maschad
- Created: 2020-05-24T22:58:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-10T20:02:08.000Z (about 1 month ago)
- Last Synced: 2024-10-24T14:28:15.743Z (25 days ago)
- Topics: ethereum, solidity
- Language: JavaScript
- Size: 904 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
- [`FarmerRole`](https://rinkeby.etherscan.io/address/0x65633987f310725a0a238cd3efb3600d2623fc91#code)
- [`DistributorRole`](https://rinkeby.etherscan.io/address/0x411b881053430c1dde640704ef88c1344b55f196#code)
- [`RetailerRole`](https://rinkeby.etherscan.io/address/0xecd75cf539135ec1d2947c959e9d3e6e739b82a7#code)
- [`ConsumerRole`](https://rinkeby.etherscan.io/address/0xf4e923a45a0a07bb0657dd72afc5692011190bd4#code)
- [`SupplyChain`](https://rinkeby.etherscan.io/address/0x50e866df867028ea06026d5047df3c5f7a000e75#code)## 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](https://metamask.io/) is connected to `http://localhost:9545` .
## Test
To run tests simply:
1. `truffle develop`
2. `compile`
3. `migrate`
4. `test`