Applied Sciences (Jul 2023)

A Reuse-Oriented Visual Smart Contract Code Generator for Efficient Development of Complex Multi-Party Interaction Scenarios

  • Xinzhe Shen,
  • Wenyu Li,
  • Hanchuan Xu,
  • Xiao Wang,
  • Zhongjie Wang

DOI
https://doi.org/10.3390/app13148094
Journal volume & issue
Vol. 13, no. 14
p. 8094

Abstract

Read online

Multi-party interaction scenarios usually involve interaction and collaboration between multiple participants, such as business negotiation, teamwork, etc. In multi-party interaction scenarios, trust mechanisms are needed to ensure the use of rights and the fulfillment of obligations. The use of blockchain and smart contracts to establish a decentralized trust mechanism is a solution. The development process of smart contracts may require experts in different fields to design them together, and it is difficult for non-experts to understand smart contract code. The traditional method of smart contract development is for the developer to manually write the smart contract code, which may lead to low development efficiency and the inability of the scene participants to understand the smart contract code. To address this challenge, we propose a reuse-oriented visual smart contract generator to efficiently develop complex multi-party interaction scenarios. This paper proposes a model based on BPMN that uses smart contracts to express the process of multi-party interaction so that the parties in various domains understand the business requirements. Then, a multi-layer reusable library is proposed and used to generate a visual solidity code. We also integrate code compilation, security checking, and deployment into the target blockchain environment for testing. The function of the tool is verified in the case of flight delay insurance, which shows that it can aid the automated development of smart contracts for multi-party interaction scenarios. At the same time, the feasibility of the tool is verified by five cases selected from the literature, which shows that it can aid the development of smart contracts to achieve a high degree of reusability.

Keywords