A visual language allowing to define blockchain smart contracts between people. It is based on the extended combination of DEMO modeling language, BPMN and UML.
We recommend to first read our article published on Medium, which summarizes the underlying technology and showcases DasContract on a case study.
The modelling part of DasContract is mainly an extension of the BPMN. The capabilities of the language are mostly demonstrated in the provided case studies. The following BPMN elements are supported in DasContract v2.0:
The editor supports the conversion of DMN logic to Solidity smart contracts. The connection of multiple Decision elements with decision tables is allowed in the decision requirements diagram.
The editor provides a simple, user-friendly interface to create DasContract diagrams, which can be then converted into smart contract code on for a desired platform. An experimental build of the editor can be accessed at https://witty-field-0790ee003.3.azurestaticapps.net/.
A user manual for using the editor can be found at https://youtu.be/aNEGOOlsviI.
The current editor supports DasContract v2.0, legacy version of the editor that supports v1.0 can be found in a separate repository
The editor is built using Blazor WebAssembly. It runs entirely in the browser, so no backend server is required and the app can be served as static pages. It also utilizes PWA technologies on supported browsers, meaning it is installable as a standalone application and can be run fully offline.
Prerequisities:
The source code for the web editor is located in the project DasContract.Editor.Web.
To run the project locally:
npm install
to install all node dependenciesnpm run build
to run a build script (packs all js files and copies dependencies into the dist folder)The E2E tests require an address of the running application to test. The application may be launched locally and then tested. The address can be defined in appsettings.json, inside of the E2E testing project.
The converter allows to automatically transform .dascontract files created using the editor into Solidity smart contract language, which can be then deployed onto the Ethereum blockchain. It supports the conversion of DasContract v2.0, an example of a conversion can be found in DasContract.CaseStudies/elections.
A number of tools exist, which allow to deploy the Solidity code onto a local testing blockchain.
The easiest way to test the code is the Remix editor, which provides a Solidity compiler and contract deployment directly in the browser. It also provides a simple interface, allowing the user to directly interact with the deployed blockchain.
Another tool that can be used is Ganache, which allows to create an Ethereum blockchain on the local machine and provides an interface to interact with the blockchain. Whilst being more complicated to setup, it allows to develop and test more complex applications alongside the blockchain.
This repository contains two exemplar case studies, one for each version of the DasContract language. The diagrams and the converted code can be found in the DasContract.CaseStudies folder.
DasContract is being actively developed, the current planned features are:
This project is created as part of Marek Skotnica's PhD thesis and research.
Contributors: Jan Frait, Jan Klicpera, Martin Drozdík, Ondřej Šelder, and Petr Ančinec.