This is the third project for @Udemy Blockchain developer Nanodegree. The purpose of this project is to go over how smart contracts can work as an extremely valuable resource for the management of supply chains.
"Coffee Supply Chain" dapp is a decentralized application that covers the supply chain of Coffee, from farmers to consumers. The user story is similar to any commonly used supply chain process. A Seller can add items to the inventory system stored in the blockchain. A Buyer can purchase such items from the inventory system. Additionally, a Seller can mark an item as Shipped, and similarly a Buyer can mark an item as Received.
All contracts are on Rinkeby Ethereum test network.
-
Contracts address and create transactions:
-FarmerRole:
- 0x8B0a50441B91B1590c39622416DEc94B56D7EAF1
- 0xfe712c580df53fed4ec426be28b542053c108c069a6767a74679f564e894a3e5
-DistributorRole:
- 0x0D1FB057EA85DF7FEE88e06E2cE0a7B8f30028FD
- 0x908be5d3062bffea0dc3acbc14df473baa851de63b9d6383f0961a08d1d75fc5
-RetailerRole:
- 0xC502282AdC3FB10fB272cb8fF1791869b0dC3B49
- 0x2b823868dc92a565d3cbd1dcaba8aeeb81ee7efcdaf8749ce9fc24c30a6b9777
-ConsumerRole:
- 0x3DE8Cd83774872041C8142082b3F15f46252b901
- 0x9c2945f7d9358dda0e1aa138c587e9922aa40e679d514e331e894b683097a076
-SupplyChain:
- 0xB90b438b5133eA5202E77b42a66cfd2953Eb1edb
- 0x1527a4b04eca48f84d400c163e2863afee513415d856b55a054ff70b4491abb3
- Solidity version ^0.5.16
- Truffle version v5.1.20
- truffle-hdwallet-provider version ^1.0.0-web3one.5
- web3 version ^1.2.6
- node version v10.15.0
- npm version 6.4.1
For testing:
- Chai
- Mocha
You need to have a ganache ui up and running
npm install
truffle compile
truffle migrate
cd app
npm run dev
To run the unit test:
truffle test
Product Overview:
Farmer Details:
Transactions to ehterscan:
Product Details
Transactions to ehterscan:
Transaction History