Cross Border Payment is a private blockchain application based on Hyperledger. This project aims to facilitate the tracking and processing of cross-border payments.
This project is a blockchain application developed on the Hyperledger framework. It includes smart contracts used for tracking, validating, and processing cross-border payments. A network has been established for transactions between different banks, ensuring transparent monitoring of payment processes.
To run this project in a local development environment, you can follow the steps below:
Requirements:
- Docker
- Nodejs
- Navigate to the
cbps-networkdirectory:
cd cbps-network- Run the following command to start the network and create a channel:
./network.sh up createChannel -c bankschannel -ca -s couchdb0- Deploy the chaincode by running the following command:
./network.sh deployCC -c bankschannel -ccn bank -ccp ../crossBorderPayment/chaincode-go/ -ccl go -ccep "OR('Org1MSP.peer','Org2MSP.peer')"- Navigate to the
crossBorderPayment/applicationdirectory:
cd ../crossBorderPayment/application- Install the required dependencies using npm:
npm install- Run the following commands to enroll the admin users:
node enrollAdmin.js org1
node enrollAdmin.js org2- Start the application by running the following command:
node app.jsIf there are no errors, the explorer interface will be accessible at http://localhost:3000.
-
Modify the necessary files for the explorer:
- Take the name of the file in the
cbps-network/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystoredirectory. - Change the end of the
adminPrivateKeyvalue in theexplorer/cbps-network.jsonfile.
- Take the name of the file in the
-
Navigate to the
explorerdirectory:
cd explorer- Run the following command to start the Docker containers:
docker-compose up- If there are no errors, the explorer interface will be accessible at
http://localhost:8080.
- Navigate to the
cbps-networkdirectory:
cd cbps-network- Run the following command to shut down the network:
./network.sh down- Navigate to the
crossBorderPayment/applicationdirectory:
cd ../crossBorderPayment/application- Delete the
walletandnode-modulesdirectories:
rm -rf wallet
rm -rf node-modulesStopping and Removing Docker Containers:
```bash
docker stop $(docker ps -a -q)
docker rm -f $(docker ps -aq)
docker system prune -a
docker volume prune
Listing Docker Containers and Images:
docker ps -a
docker images -a
docker volume ls
