Skip to content

Coffee Track is an Ethereum-based decentralized application (DApp) that showcases a supply chain flow for coffee from farmers to consumers.

License

Notifications You must be signed in to change notification settings

blockchaincyberpunk1/coffee-track

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum Supply Chain DApp - Coffee Track

License GitHub Stars GitHub Forks GitHub Issues GitHub Pull Requests

Table of Contents

Introduction

Coffee Track is an Ethereum-based decentralized application (DApp) that showcases a supply chain flow for coffee from farmers to consumers. This project demonstrates how blockchain technology can enhance transparency and traceability in supply chains.

Features

Coffee Track offers various features through its smart contracts:

  • Role-Based Access Control: Different roles for participants like Farmers, Distributors, Retailers, and Consumers.
  • Tracking Coffee Journey: From harvesting, processing, packing, for sale, sold, shipped, received to purchased stages.
  • Ownership Management: Smart contract functionalities to manage ownership.

Installation

To set up Coffee Track locally:

  1. Clone the repository:

    git clone https://github.com/blockchaincyberpunk1/coffee-track.git
  2. Navigate to the project directory:

    cd coffee-track
  3. Install dependencies:

    npm install
  4. Compile the smart contracts:

    npx hardhat compile

Smart Contracts

Access Control

  • Owned.sol: Manages contract ownership.
  • Roles.sol: Library for managing addresses assigned to a Role.
  • ConsumerRole.sol: Contract to manage a 'consumer' role.
  • DistributorRole.sol: Contract for distributor role management.
  • FarmerRole.sol: Contract for farmer role management.
  • RetailerRole.sol: Contract for retailer role management.

Base Contract

  • SupplyChain.sol: The main contract that tracks the coffee product journey.

Core Contract

  • Ownable.sol: Extends SupplyChain with ownership control functionalities.

Usage

To deploy the smart contracts to a local Ethereum network:

  1. Start a local Ethereum node:

    npx hardhat node
  2. Deploy the contracts:

    npx hardhat run scripts/deploy.js --network localhost

Contributing

Contributions to Coffee Track are welcome! Please read our Contribution Guidelines for more information on how to report bugs, suggest features, or submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Ownable contract deployed to: 0xd9D29e8a4E257A8813FF1E8CA1814C742ABb75BD

About

Coffee Track is an Ethereum-based decentralized application (DApp) that showcases a supply chain flow for coffee from farmers to consumers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published