The widespread adoption of smart contracts, self-executing agreements on the blockchain, is hindered by the complexity of translating real-world contracts, often written in multiple languages, into their digital counterparts. This paper addresses this challenge by introducing an innovative approach based on Contract Text Markup Language (CTML), an extensible markup language specifically designed to facilitate the automatic generation of smart contracts from multilingual contracts. CTML overcomes traditional method limitations by employing a two-stage transformation process: (1) Contract Abstraction and Markup: CTML redefines grammar rules and incorporates encoding extensions to transform multilingual contracts into structured, marked-up contracts. This process effectively abstracts the essential details of the original contract, enabling language-agnostic interpretation. (2) Domain-Specific Language (DSL) Translation and Smart Contract Code Generation: The marked-up contract is then seamlessly translated into a DSL program, capturing the legal concepts in a machine-readable format. Finally, the DSL program is automatically compiled into executable smart contract code, ready for deployment on the blockchain. The effectiveness of the proposed approach is demonstrated using a legal contract in both English and Chinese. Therefore, the CTML-based approach can automatically generate smart contracts from multilingual contracts, enabling a more inclusive and accessible smart contract ecosystem.
Chen et al. (Fri,) studied this question.