Skip to content

Latest commit

 

History

History
200 lines (160 loc) · 6.96 KB

README.md

File metadata and controls

200 lines (160 loc) · 6.96 KB

Contributors Forks Stargazers Issues MIT License


Logo

KBC ICP Incubator Library

A comprehensive library for managing on-chain coffee trading operations, combining Solidity smart contracts, ICP canisters, and NodeJS integration.
Quick Start · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Project Structure
  4. Development
  5. Testing
  6. Contributing
  7. License
  8. Contact

About The Project

The KBC ICP Incubator Library defines the logic responsible for managing the on-chain operations of the KBC Coffee Trading Project. It provides a comprehensive solution that combines blockchain smart contracts, Internet Computer Protocol (ICP) canisters, and a user-friendly NodeJS wrapper library.

Built With

  • Solidity
  • Rust
  • ICP
  • Node.js

(back to top)

Getting Started

Prerequisites

  • Git
  • Nodejs (v.20.x recommended)
  • Rust (v.1.26.0 recommended)
  • DFX (v.0.23.0 recommended)

Installation

  1. Clone the repository
    git clone https://github.com/IsinBlockchainTeam/kbc-icp-incubator-library.git
  2. Enter the project directory
    cd kbc-icp-incubator-library
  3. Follow component-specific setup:

(back to top)

Project Structure

.
├── blockchain/        # Ethereum smart contracts and tests
├── icp/              # Internet Computer Protocol canisters
│   ├── rust-canisters/   # Rust-based canisters
│   └── ts-canisters/     # TypeScript-based canisters
├── src/              # Main source code
│   ├── drivers/      # Service drivers
│   ├── entities/     # Business entities
│   ├── services/     # Business logic
│   └── types/        # Type definitions
└── scripts/          # Utility scripts

(back to top)

Development

Starting Local Environment

./scripts/start-local-environment.sh

This script sets up your complete development environment by:

  • Starting a local Hardhat node (Ethereum blockchain)
  • Configuring Ngrok for external access
  • Launching the ICP DFX environment
  • Deploying and configuring smart contracts
  • Setting up initial funds and data

Each service is launched in a separate terminal tab for easy monitoring.

Building Canisters

cd icp && ./scripts/build-canisters.sh

Deploying

# Local deployment
./icp/scripts/deploy-local.sh

# IC deployment
./icp/scripts/deploy-ic.sh

Testing

Each component includes its own test suite:

# Blockchain tests
cd blockchain && npm test

# ICP tests
cd icp/ts-canisters && npm test

# Source code tests
cd src && npm test

(back to top)

Contributing

  1. Create a feature branch from main
  2. Make your changes
  3. Write/update tests
  4. Submit a merge request to main

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: kbc-icp-incubator-library

Organization Link: IsinBlockchainTeam

(back to top)