This tutorial creates a blockchain-based business network on the IBM Blockchain Platform that invokes Clause to execute Smart Legal Contracts.

This tutorial does not require writing any code, but familiarity with GitHub is recommended.

The state of a set of assets and participants are stored on a blockchain, whilst smart legal contracts are externalized for execution on the Clause platform. Instead of hardcoding legal business logic into the chaincode, the logic is externalized into a Smart Clause template and invoked out of process using Clause.

1. Create your IBM Blockchain Platform instance

If you have already deployed the Clause sample on IBM Blockchain Platform via the toolchain, you can skip to step 2.
Option 1: If you already have an instance of IBM Blockchain Platform

From the Samples page of your blockchain instance, choose the Clause Perishable Goods sample and follow the instructions.

Option 2: If you're new to IBM Blockchain Platform

Click the button below to automatically provision the required IBM Cloud resources and to deploy the sample.

Deploy to IBM Cloud

2. Create and confirm your account on Clause

You should now have your own version of the demonstration application running that looks similar to the image below.

Use the sign-up form to register for Clause. You will need to confirm your email address to complete your registration.

3. Create your Smart Legal Contract on Clause

Once logged in to Clause:

  1. Click 'Create New Contract'
  2. Click '+ Add Clause'
  3. Check 'View advanced templates'
  4. Choose the 'perishable-goods' clause
  5. Optionally give your contract a name. Click The edit icon next to 'untitled' in the top-left to change the name.
  6. Change the parameters of the contract, for example, adjust the temperature/humidity range or the penalties.
  7. In the Smart Clauses® panel on the right, scroll down to Triggers.
  8. Copy the Trigger URL (which starts into the first box in the demonstration application.
  9. Copy the Bearer authentication token into the second box in the demonstration application.

4. Switch back to the demonstration application

Continue to follow the instructions in the demonstration application.

If you provide many out of range readings the contract limits the penalty at the cost of the shipment. In this case it appear that no funds are transferred.

5. You're all done in Clause for now!

When you've finished the sample, there's lots more to do with Clause! For example:

  • Add other clauses to your contract from a template library.
  • Add signatories to your contract to electronically sign it.
  • Add a custom action to automate a contractual obligation such as making a payment.
  • Investigate the source code of the Smart Clause. This is written in a domain specific language for smart legal contracts called Ergo. Shot 2018-06-15 at 09.36.29--mk.png