Archived | Connected contracting: Using off-chain smart contracts to manage a supply chain
Deploy a Hyperledger Composer business network that invokes Clause to execute smart legal contracts
Learn how to track perishable goods on a Hyperledger blockchain using a smart legal contract running on Clause to capture the contractual terms and penalty calculations between food producers, importers, and shippers.
The food industry is the perfect place to apply blockchain technology. Our local grocery store hates having to waste food because of spoilage and would jump at the opportunity to track its food supply chain. Blockchain enables traceability and ensures the quality of food produce by tracking each product’s origin along with its current status. As most things become digitized, so are contracts. Blockchain is transforming the exchange of assets to a model based on a business network that uses a distributed ledger. This model requires that you establish governing rules for digital asset exchanges — hence, the idea of smart contracts was born. The Accord Project is an open source software initiative that has established specifications, tooling, and code for smart legal contracts.
This developer code pattern illustrates how a legal agreement, such as a shipping contract, can be automated with the use of trusted data from the IBM Blockchain Platform. In this scenario, the Hyperledger Composer business network (executing on Hyperledger Fabric v1) invokes the Clause platform. Hyperledger Fabric stores the state of assets on the blockchain, while the Cicero engine from the Accord Project executes contract logic off-chain on the Clause platform.
When you have completed this code pattern, you will understand how to:
- Deploy a network to the IBM Blockchain Starter Plan
- Configure and use the Clause platform to build and execute a contract
- Run an Angular application that utilizes the Clause smart contract
- The application receives a shipment request.
- A transaction is submitted to the IBM Blockchain Platform.
- The Hyperledger Composer-based business network running on the IBM Blockchain Platform updates the state of assets.
- A call is issued to Clause to trigger execution of a smart legal contract.
- The smart legal contract is executed and, assuming verifications pass, a payment is subsequently calculated.
- Assets on the blockchain are updated: Blocks are written to the network and the world state is updated.
Find the detailed instructions in the README. These steps explain how to:
- Deploy to the IBM Cloud.
- Set up a smart legal contract.
- Run the client application.