Back to Search Start Over

An Annotation Assisted Smart Contracts Generation Method

Authors :
Yong Chen
Defeng Hu
Chao Xu
Nannan Chen
Source :
IEEE Access, Vol 12, Pp 51485-51499 (2024)
Publication Year :
2024
Publisher :
IEEE, 2024.

Abstract

Smart contracts are rapidly applied in many fields, with their varied types and increasing complexity. A sharp increase in the method development demands seems to be certain. However, this type of development has its unique programming language and security requirements, making it difficult for regular software personnel to adapt quickly. It is important to realize that the development efficiency is application-specific and that getting this application issue solved is critical for its further development. To this end, we propose a new, automatic, and intelligent contract-generation method, based on code annotation. First of all, combined with the semantic annotation information of smart contract code association, a clustering analysis model is built to realize fast and accurate clustering with functions similar to smart contracts. Then, based on the Char-RNN network, a multi-level and automatic generation method of intelligent contract knowledge base is built to realize the automatic generation at different levels, such as the contract layer, function layer, and interface layer. Finally, by using text matching technology and by calculating the semantic similarity of the user text demands as well as the smart contract knowledge base annotation, the relevant contract code is automatically extracted for users to choose, with the aims of improving the method efficiency and to meet the needs of different users. To test the effectiveness of the method, with the aid of bilingual quality assessment BLEU and Mythril, VaaS, and other code security tools for evaluation are used and results are compared with the existing method. The generated code BLEU average score was increased by 27% and the average accuracy was increased by 11.5%. Therefore, the smart contract generated by our method is relatively accurate and reliable.

Details

Language :
English
ISSN :
21693536
Volume :
12
Database :
Directory of Open Access Journals
Journal :
IEEE Access
Publication Type :
Academic Journal
Accession number :
edsdoj.20164722a44450885ede051b011f383
Document Type :
article
Full Text :
https://doi.org/10.1109/ACCESS.2024.3386751