ContractPen: Viewing Accord Project Contracts

The Accord Project is an useful emerging software stack for smart legal contracts which has logic in the form of the Ergo language and data models in the form of Hyperledger Composer Concerto (.CTO file extension) model files. The combination of code and legal contract templates allows for smart legal contracts to be created and as such this is a completely new and exciting area in blockchain technology.

To explore how Accord Project integrates with ContractPen lets consider how Accord Project sample templates from Accords Cicero Template Github repository can be imported into ContractPen to execute or view. By exploring these contracts this can give a perspective on how the Accord Project works with data models and templates.

Here are some example Accord Project templates which have already been imported:

Hello World
Hello World State
Acceptance of Delivery
Demand Forecast
Eat Apples
Service Level Agreement
Volume Discount

There are also many other models available for the Accord Project at and templates at These will be further integrated into ContractPen in the near future.

What can be achieved with Accord Project Templates in ContractPen?

    Accord templates can be be combined with data to render a final contract. Data in the form of data models can have values and these values are used within the legal contract template.
    Data models edited within ContractPen can be visually edited via forms to generate CTO model files in computer code. This means there is no need to write code for data models as the models created in ContractPen will be automatically converted into CTO model code.
  3. Execution of Accord Clause
    The Accord Clause can be executed and a result produced.
  4. Downloadable code generation
    Code generated from the data models can be downloaded as a Accord Project ZIP file to be used outside of ContractPen with the accord projects tooling.

Let us consider one of the most simple examples, Hello World State, here click on the contract to view it and use the left menu to click on Create Contract. You can see here the final contract rendered, but how did it get produced?

The explanation for how the above contract was generated is shown in the below image. The Contract Template menu contains the template for the contract and its template is combined with the data from the model HelloWorldClause. The two menu items below show the data which is combined together to result in the above contract. This uses the template system of Accord Project, for example template values are expressed using the [{name}] notation and behind the scenes the accord project is being used as a library.
Although this is a very simple template case, it can be imagined that many data models and many data template values can be combined for a more complex case.

Now to execute the Accord clause associated with the contract then click on the Accord Project menu on the left and then the tab on the top as Execute Accord Project. Click on the “Click to Execute” button to execute this Accord Clause. Here the request, response and state involved is shown. In this case as it is a stateful clause the counter will increment on each execution of the clause.

Although this is a simple example it demonstrates the integration of the Accord Project within ContractPen to facilitate smart legal contracts.

This article will be continued in a part 2.