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
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.
- Clone the repository
git clone https://github.com/IsinBlockchainTeam/kbc-icp-incubator-library.git
- Enter the project directory
cd kbc-icp-incubator-library
- Follow component-specific setup:
.
├── 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
./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.
cd icp && ./scripts/build-canisters.sh
# Local deployment
./icp/scripts/deploy-local.sh
# IC deployment
./icp/scripts/deploy-ic.sh
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
- Create a feature branch from
main
- Make your changes
- Write/update tests
- Submit a merge request to
main
Distributed under the MIT License. See LICENSE
for more information.
- Tommaso Agnola - [email protected]
- Mattia Dell'Oca - [email protected]
- Luca Giussani - [email protected]
- Lorenzo Ronzani - [email protected]
Project Link: kbc-icp-incubator-library
Organization Link: IsinBlockchainTeam