This is the complete backend code for the London Utility Coin (LUC) Hyperledger Fabric blockchain. LUC is a cryptocoin which incentives users to save on utility usage using the motivation of a simple cryptocurrency. LUC can be traded to benefit utility users who may be struggling to pay bills and can be collected by simply using less utilities than others.
LUC uses Hyperledger Fabric Blockchain with the Hyperledger Composer framework.
- London Utility Coin Portal (LUC front-end access portal).
- London Utility Coin Arduino Package (LUC meter hardware code).
-
Follow the hyperledger composer setup tutorial to get pre-requisites and set up the development environment.
-
Once the development environment is set up, pull the london-utility-coin project to the fabric-dev-servers folder.
Set up complete!
- Run following command in your fabric-dev-servers folder.
./startFabric.sh
./createPeerAdminCard.sh- Run following commands in your /fabric-dev-servers/london-utility-coin:
composer archive create -t dir -n .
composer network install --card PeerAdmin@hlfv1 --archiveFile london-utility-coin@{CURRENT_LUC_VERSION}.bna
composer network start --networkName london-utility-coin --networkVersion {CURRENT_LUC_VERSION} --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
composer card import --file networkadmin.card- Check if LUC is up and running.
composer network ping --card admin@london-utility-coinWorking on LUC or any hyperledger blockchain can be tricky. I recommend using Hyperledger composer playground *note this is depreciated as of August 2019, but still works well for now.
To start playground run this command in your london-utility-coin directory:
composer-playgroundComposer REST API It is easy to start the REST server API for LUC. Run this command in your london-utility-coin directory:
composer-rest-server- Run the following commands in your fabric-dev-servers folder.
./stopFabric.sh
./teardownFabric.shLUC runs on the hyperledger composer framework. For more detailed (and better) information on many of these commands see the composer documentation.