This directory contains all scripts for managing the Fabric Zakat network.
scripts/
├── demo/ # Development and testing scripts
│ ├── env.sh # Environment variables
│ ├── 00_cleanup.sh # Network cleanup
│ ├── 01_network_setup.sh # Start network
│ ├── 02_channel_setup.sh # Channel creation
│ ├── 03_chaincode_setup.sh # Deploy chaincode
│ ├── 04_test_chaincode.sh # Test network
│ └── demo.sh # Run entire network
├── dev/ # Development environment scripts
└── temp/ # Temporary files directory
This directory contains scripts for development and testing of the Fabric Zakat network. Note: These scripts are intended for development and testing purposes only. For production deployment, follow Hyperledger Fabric's official guidelines.
- Sets up required environment variables for development
- Defines paths and configuration locations
- Sets organization-specific variables for testing
To set up and run the development network:
./demo.sh
This script handles development setup:
- Cleaning up previous network
- Generating test materials
- Starting development network
- Creating and joining test channel
- Deploying chaincode
- Running basic tests
The development network uses fabric_test
as the Docker network name. This is for development consistency only and should be reconfigured for production.
The dev
directory contains development testing resources:
cleanup.sh
: Development environment cleanup
The temp/
directory stores:
- Chaincode packages
- Package IDs
- Sequence numbers
- Other temporary artifacts
This directory is cleaned by 00_cleanup.sh
Each script:
- Checks for required environment variables
- Validates prerequisites
- Provides clear error messages
- Exits on critical failures
- Always source
env.sh
first - Run scripts in the correct order
- Check logs for errors
- Clean up before restarting network
-
Path Issues
- Verify PROJECT_ROOT is set
- Check file permissions
- Use absolute paths
-
Docker Problems
- Run cleanup script
- Check Docker service
- Verify network connectivity
-
Chaincode Errors
- Check Go environment
- Verify dependencies
- Check package IDs
- These scripts are for development and testing only
- Not suitable for production deployment as-is
- Security features are minimal for development ease
- Production deployment requires:
- Proper security configuration
- Network hardening
- Access control setup
- Monitoring implementation
- Backup procedures
This project is licensed under the MIT License - see the LICENSE file for details.